Palm print recognition method, method for training feature extraction model, device, and medium

ABSTRACT

Embodiments of this application disclose a palm print recognition method, a method for training a feature extraction model, a device, and a storage medium, and belong to the field of computer technologies. The method includes: obtaining sample hand images for each of a plurality of sample user identifiers, at least two of the sample hand images associated with the each of the plurality of sample user identifier being acquired from image acquisition devices having different image acquisition characteristics; calling a feature extraction model to extract sample palm print features of the plurality of sample user identifiers; and adjusting the feature extraction model according to the sample palm print features of the plurality of sample user identifiers.

RELATED APPLICATION

This application is a continuation application of PCT Patent ApplicationNo. PCT/CN2021/098286, filed on Jun. 4, 2021, which claims priority toChinese Patent Application No. 202010659354.2, filed with the ChinaNational Intellectual Property Administration on Jul. 9, 2020, each ofwhich is incorporated by reference in its entirety.

FIELD OF THE TECHNOLOGY

Embodiments of this application relate to the field of computertechnologies, and in particular, to a palm print (or palmprint)recognition technology.

BACKGROUND OF THE DISCLOSURE

With the development of computer technologies, the palm printrecognition technology is increasingly widely applied. Since palm printsin a palm of a user is a biometric feature with uniqueness, the user maybe authenticated through the palm prints of the user.

A palm print recognition method is provided in the related art, toobtain a hand image to be verified, and encode the hand image to obtainan image feature of the hand image. The image feature may include a palmprint feature. A feature recognition model is called to recognize theimage feature to determine a user identifier of the hand image. Theforegoing method has high requirements on the quality of the hand imageand a narrow application range. In addition, accuracy of the encodedimage feature is poor, resulting in poor accuracy of the determined useridentifier.

SUMMARY

According to an aspect, an embodiment of this disclosure provides a palmprint recognition method, performed by a computer device, the methodincluding:

obtaining a target hand image, the target hand image including a palm;

calling a feature extraction model to perform feature extractionaccording to the target hand image, to obtain a target palm printfeature, the feature extraction model being obtained through trainingaccording to sample palm print features of a plurality of sample useridentifiers, each sample user identifier including a plurality of samplepalm print features, the plurality of sample palm print features beingobtained by respectively performing feature extraction on a plurality ofcorresponding sample hand images of the sample user identifier, and aplurality of sample hand images of a same sample user identifier beingacquired by using different types of devices; and

performing recognition processing on the target palm print featureaccording to a plurality of preset palm print features stored and useridentifiers corresponding to the preset palm print features, todetermine a target user identifier of the target palm print feature.

According to another aspect, a method for training a feature extractionmodel is provided, performed by a computer device, the method including:

obtaining sample hand images of a plurality of sample user identifiers,a plurality of sample hand images of a same sample user identifier beingacquired by using different types of devices;

calling a feature extraction model to perform feature extractionaccording to the sample hand images, to obtain sample palm printfeatures; and

training the feature extraction model according to the sample palm printfeatures of the plurality of sample user identifiers.

According to another aspect, a palm print recognition apparatuscorresponding to the foregoing palm print recognition method, anapparatus for training a feature extraction model corresponding to theforegoing method for training a feature extraction model, and computerdevices and corresponding non-transitory computer-readable storagemediums, computer program products or computer programs of the modeltraining method that can perform the palm print recognition method andthe method for training a feature extraction model are provided.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of thisdisclosure more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showonly some embodiments of this disclosure, and a person of ordinary skillin the art may still derive other accompanying drawings from theaccompanying drawings without creative efforts.

FIG. 1 is a schematic structural diagram of an implementationenvironment according to an embodiment of this disclosure.

FIG. 2 is a flowchart of a palm print recognition method according to anembodiment of this disclosure.

FIG. 3 is a flowchart of a palm print recognition method according to anembodiment of this disclosure.

FIG. 4 is a schematic diagram of a position of a palm key pointaccording to an embodiment of this disclosure.

FIG. 5 is a schematic diagram of a position of a palm key pointaccording to an embodiment of this disclosure.

FIG. 6 is a flowchart of a palm print recognition method according to anembodiment of this disclosure.

FIG. 7 is a flowchart of cross-device payment according to an embodimentof this disclosure.

FIG. 8 is a flowchart of cross-device identity verification according toan embodiment of this disclosure.

FIG. 9 is a flowchart of obtaining a recognition result according to anembodiment of this disclosure.

FIG. 10 is a flowchart of a model training method according to anembodiment of this disclosure.

FIG. 11 is a schematic diagram of hand images and palm images accordingto an embodiment of this disclosure.

FIG. 12 is a schematic diagram of palm images of different types ofdevices according to an embodiment of this disclosure.

FIG. 13 is a schematic diagram of a distance between mean values ofsimilarities of a positive sample image combination and a negativesample image combination according to an embodiment of this disclosure.

FIG. 14 is a flowchart of a model training method according to anembodiment of this disclosure.

FIG. 15 is a flowchart of a model training method according to anembodiment of this disclosure.

FIG. 16 is a schematic diagram of first distribution relationship datacorresponding to different loss functions according to an embodiment ofthis disclosure.

FIG. 17 is a schematic diagram of a palm print feature distributionaccording to an embodiment of this disclosure.

FIG. 18 is a schematic diagram of distribution relationship dataaccording to an embodiment of this disclosure.

FIG. 19 is a schematic diagram of distribution relationship dataaccording to an embodiment of this disclosure.

FIG. 20 is a schematic diagram of distribution relationship dataaccording to an embodiment of this disclosure.

FIG. 21 is a flowchart of a model training method according to anembodiment of this disclosure.

FIG. 22 is a schematic diagram showing a relationship between weightparameters and accuracy according to an embodiment of this disclosure.

FIG. 23 is a schematic structural diagram of a palm print recognitionapparatus according to an embodiment of this disclosure.

FIG. 24 is a schematic structural diagram of a palm print recognitionapparatus according to an embodiment of this disclosure.

FIG. 25 is a schematic structural diagram of a model training apparatusaccording to an embodiment of this disclosure.

FIG. 26 is a schematic structural diagram of a terminal according to anembodiment of this disclosure.

FIG. 27 is a schematic structural diagram of a server according to anembodiment of this disclosure.

DESCRIPTION OF EMBODIMENTS

To make objectives, technical solutions, and advantages of theembodiments of this disclosure clearer, the following further describesin detail implementations of this application with reference to theaccompanying drawings.

It may be understood that, the terms “first”, “second”, “third”,“fourth”, and the like used in this application may be used fordescribing various concepts in this specification. However, the conceptsare not limited by the terms unless otherwise specified. The terms aremerely used for distinguishing one concept from another concept. Forexample, without departing from the scope of this application, a firstpreset value may be referred to as a second preset value, and similarly,the second preset value may be referred to as the first preset value.

For the terms “at least one”, “a plurality of”, “each”, and “any” usedin this application, “at least one” refers to “one”, “two”, or “more”,“a plurality of” refers to “two” or “more”, “each” refers to “each of aplurality of corresponding”, and “any” refers to “any one of a pluralityof”. For example, when “a plurality of palm images” refers to “threepalm images”, “each” refers to “each of the three palm images”, and“any” refers to “any one of the three palm images”, that is, may be thefirst palm image, the second palm image, or the third palm image.

The solutions provided in the embodiments of this disclosure, based onthe machine learning technology of artificial intelligence, can train apalm extraction model and a feature extraction model. A palm printfeature of a hand image is then obtained by using the trained palmextraction model and feature extraction model, and a user identifier maybe subsequently determined according to the obtained palm print feature,thereby identifying the identity of the user to which the hand imagebelongs.

The palm print recognition method provided in the embodiments of thisdisclosure may be used in a computer device, where the computer deviceincludes a terminal or a server. The server may be an independentphysical server, or may be a server cluster or a distributed systemformed by a plurality of physical servers, or may be a cloud server thatprovides a basic cloud computing service such as a cloud service, acloud database, cloud computing, a cloud function, cloud storage, anetwork service, cloud communication, a middleware service, a domainname service, a security service, a content delivery network (CDN), bigdata, and an artificial intelligence platform. The terminal may be asmartphone, a tablet computer, a notebook computer, a desktop computer,a smart speaker, a smartwatch, or the like, but is not limited thereto.The terminal and the server may be directly or indirectly connected in awired or wireless communication manner. This is not limited in thisapplication.

FIG. 1 is a schematic structural diagram of an implementationenvironment according to an embodiment of this disclosure. Referring toFIG. 1, the implementation environment includes a terminal 101 and aserver 102. The terminal 101 establishes a communication connection withthe server 102, and interacts through the established communicationconnection.

The terminal 101 obtains a target hand image, and sends the target handimage to the server 102. After receiving the target hand image, theserver 102 calls a feature extraction model to perform featureextraction according to the target hand image, to obtain a target palmprint feature. Further, recognition processing is performed on thetarget palm print feature according to a plurality of preset palm printfeatures stored and user identifiers corresponding to the preset palmprint features, to determine a target user identifier of the target palmprint feature, and send the target user identifier to the terminal 101.

The method provided in this embodiment of this disclosure may be used inan identity verification scenario.

For example, in a smart payment scenario:

A terminal of a merchant obtains a hand image of a user by photographinga palm of the user, uses the palm print recognition method provided inthis embodiment of this disclosure to determine a target user identifierof the hand image, and transfers some resources in a resource accountcorresponding to the target user identifier to a resource account of themerchant, thereby implementing automatic payment through the palm.

In another example, in a cross-device payment scenario:

The user may use a personal mobile phone to complete identityregistration at home or other private spaces, and bind the account ofthe user with a palm print feature of the user. The user may then go toan in-store device to identify the palm print feature of the user,determine the account of the user, and pay directly through thisaccount.

In another example, in a work or office check-in scenario:

The terminal obtains a hand image of a user by photographing a palm ofthe user, uses the palm print recognition method provided in thisembodiment of this disclosure to determine a target user identifier ofthe hand image, and establishes a check-in mark for the target useridentifier, to determine that the target user identifier has completedwork check-in at the current time.

FIG. 2 is a flowchart of a palm print recognition method according to anembodiment of this disclosure. The method is applicable to a computerdevice. As shown in FIG. 2, the method includes:

201: A computer device obtains a target hand image.

The target hand image is a hand image of a user identifier to bedetermined, the target hand image includes a palm, the palm is a palm ofa user whose identity is to be verified, and the target hand image mayfurther include other information, such as a finger of the user and ascene in which the palm of the user is captured. The target hand imagemay be obtained by photographing the palm of the user whose identity isto be verified by the computer device, or may be sent by other devices.For example, the computer device is a store payment device, and thestore payment device captures the palm of the user through a camera toobtain the target hand image. Alternatively, the computer device is apalm print recognition server. After capturing the target hand image,the store payment device sends the target hand image to the palm printrecognition server.

202. The computer device calls a feature extraction model to performfeature extraction according to the target hand image, to obtain atarget palm print feature.

The target palm print feature is used to represent a feature of the palmincluded in the target hand image, and the target palm print feature maybe represented by a vector or in other forms. Since palm prints in palmsof different users are different and the palm prints are unique, palmprint features of the palms of different users are different.

The feature extraction model is a model for extracting palm printfeatures, and the feature extraction model is obtained by training aplurality of sample hand images. When the feature extraction model istrained, sample hand images of a plurality of sample user identifiersare obtained, feature extraction is performed on the plurality of samplehand images by calling the feature extraction model to obtain aplurality of sample palm print features, and the feature extractionmodel is trained according to the sample palm print features of theplurality of sample user identifiers, thereby obtaining a trainedfeature extraction model. Each sample user identifier includes aplurality of sample palm print features, and a plurality of sample handimages of a same sample user identifier is acquired by using differenttypes of devices.

Since the quality of sample hand images acquired by different types ofdevices is different, there may be sample hand images with highdefinition, and sample hand images with low definition. Therefore, thefeature extraction model is trained according to sample hand imagesacquired by different types of devices (i.e., devices supportingdifferent image quality/definition), so that the trained featureextraction model can perform feature extraction on the sample handimages acquired by different types of devices, thereby having a widerange of application, improving the accuracy of obtained palm printfeatures, and subsequently improving the accuracy of determined useridentifiers.

The feature extraction model is called to perform feature extraction ona target palm image, so that a target palm print feature of a palmincluded in the target palm image can be obtained, which is convenientfor subsequent determination of a user identifier corresponding to thetarget palm image.

In addition to the palm, the target hand image obtained by the computerdevice may further include other information, such as a finger of theuser and a shooting scene. Therefore, to avoid the impact of otherinformation in the target hand image, the palm in the target hand imageis highlighted, to improve the accuracy of the palm print featureobtained subsequently. In a possible implementation, the implementationof S202 may be that the computer device performs palm extraction on thetarget hand image to obtain a target palm image of the target handimage, and then calls the feature extraction model to perform featureextraction on the target palm image, to obtain a target palm printfeature.

The target palm image only includes the palm portion in the target handimage, and may be a partial image of the target hand image.

In a possible implementation, the palm extraction model may be used forpalm extraction, so that the target palm image of the target hand imageonly includes the palm, which avoids the impact of other information inthe target hand image, highlights the palm in the target palm image, andimproves the accuracy of the palm print feature obtained subsequently.

203: The computer device performs recognition processing on the targetpalm print feature according to a plurality of preset palm printfeatures stored and user identifiers corresponding to the preset palmprint features, to determine a target user identifier of the target palmprint feature.

The preset palm print feature is a palm print feature of the palm whoseuser identifier is known. Each preset palm print feature has acorresponding user identifier, indicating that the preset palm printfeature belongs to the user identifier and is a palm print feature ofthe palm of the user. The user identifier may be any type of useridentifier, for example, the user identifier is a user identifierregistered in a payment application, or the user identifier is a useridentifier registered in an enterprise.

In this embodiment of this disclosure, the computer device may include apreset database, where the preset database includes a plurality ofpreset palm print features, and a user identifier corresponding to eachpreset palm print feature. In the preset database, preset palm printfeatures and user identifiers may be in one-to-one correspondence, orone user identifier may correspond to at least two preset palm printfeatures.

For example, when a plurality of users register in a paymentapplication, a palm print feature of each user is bound with acorresponding user identifier, and the palm print features of theplurality of users and the corresponding user identifiers are stored inthe database. When a user uses the payment application subsequently, atarget user identifier is determined through an obtained target palmfeature and the preset palm print features in the database, to implementidentity verification of the user.

In the method provided in this embodiment of this disclosure, when palmprint recognition is performed, a target hand image including a palm isobtained, and a feature extraction model is called to perform featureextraction according to the target hand image, to obtain a target palmprint feature, so that a corresponding user identifier can be preciselydetermined according to the obtained palm print feature. Since thesample hand images used in training the feature extraction model areacquired by different types of devices, the feature extraction model canadapt to hand images acquired by various types of devices, and has awide range of application. In addition, the trained feature extractionmodel can accurately perform feature extraction on hand images capturedby various types of devices, which improves the robustness of thefeature extraction model.

FIG. 3 is a flowchart of a palm print recognition method according to anembodiment of this disclosure. The method is applicable to a computerdevice. As shown in FIG. 3, the method includes:

301: A computer device obtains a target hand image.

In a possible implementation, step 301 may include that: the computerdevice photographs a palm of a user to obtain a target hand image. Thetarget hand image includes the palm, and the palm may be a left palm orright palm of the user. For example, the computer device is an Internetof Things device. The Internet of Things device captures the left palmof the user through a camera to obtain the target hand image, and theInternet of Things device may be a palm print payment terminal, amerchant payment terminal, or the like. In another example, when theuser performs a transaction in a store, the user stretches the palm to acamera of a payment terminal of the store, and the payment terminal ofthe store captures the palm through the camera to obtain the target handimage.

In another possible implementation, step 301 may include that: thecomputer device establishes a communication connection with anotherdevice, and receives the target hand image sent by the another devicethrough the communication connection. For example, the computer deviceis a payment application server, and the another device may be a paymentterminal. After the payment terminal captures the palm of the user andobtains the target hand image, through the communication connectionbetween the payment terminal and the payment application server, thetarget hand image is sent to the payment application server, to enablethe payment application server to determine a user identifier of thetarget hand image.

302: The computer device performs palm key point detection on the targethand image to obtain at least one palm key point in the target handimage.

The palm key point may be any point of the palm, for example, the palmkey point may include a gap key point between an index finger and amiddle finger, or the palm key point may include a gap key point betweenthe middle finger and a ring finger, or the palm key point is a gap keypoint between the ring finger and a little finger.

Since the palm may exist in any region in the target hand image, todetermine a position of the palm in the target hand image, palm keypoint detection is performed on the target hand image to obtain at leastone palm key point of the target hand image, so that the region wherethe palm is located can be determined subsequently according to the atleast one palm key point.

In a possible implementation, step 302 may include: performing palm keypoint detection on the target hand image to obtain coordinates of atleast one palm key point in the target hand image.

For example, in the target hand image, a coordinate system isestablished with an upper left corner of the target hand image as anorigin, or a coordinate system is established with a center point of thetarget hand image as the origin. After at least one palm key point isdetected, coordinates of the at least one palm key point in thecoordinate system can be determined.

303: The computer device determines a target region where the palm islocated in the target hand image according to the at least one palm keypoint.

The target region is a region covering the palm in the target handimage, and the target region may be a region of any shape, for example,a circular region or a square region. Since the palm key point is apoint in the palm, the target region where the palm is located in thetarget hand image may be determined through the determined at least onepalm key point, and a palm image may be subsequently extracted throughthe target region.

In a possible implementation, the at least one palm key point includes afirst palm key point, a second palm key point, and a third palm keypoint, and the second palm key point is located between the first palmkey point and the third palm key point. The distribution positions ofthe first palm key point, the second palm key point, and the third palmkey point in the palm are shown in FIG. 4. Step 303 may include thefollowing steps 3031 to 3035:

3031: The computer device uses a product of a distance between the firstpalm key point and the third palm key point and a third preset value asa first distance.

In this embodiment of this disclosure, a fourth palm key point may beused as a center point of the palm, which integrates a relative positionof the first palm key point, the second palm key point, the third palmkey point, and the fourth palm key point in the palm of the ordinaryperson. Generally, the fourth palm key point and the second palm keypoint are on a straight line, and the straight line formed by the fourthpalm key point and the second palm key point is perpendicular to astraight line formed by the first palm key point and the third palm keypoint. For example, the first palm key point is the gap key pointbetween the index finger and the middle finger, the second palm keypoint is the gap key point between the middle finger and the ringfinger, the third palm key point is the gap key point between the ringfinger and the little finger, and the fourth palm key point is thecenter point of the palm. In the palm of the ordinary person, a straightline formed by the gap key point between the index finger and the middlefinger, and the gap key point between the ring finger and the littlefinger is perpendicular to a straight line formed by the gap key pointbetween the middle finger and the ring finger, and the center point ofthe palm. In addition, a ratio of a distance between the first palm keypoint and the third palm key point to a distance between the fourth palmkey point and the second palm key point of the ordinary person isintegrated, to estimate the third preset value. That is, in the palm ofthe ordinary person, there is a proportional relationship between thedistance between the first palm key point and the third palm key pointand the first distance between the fourth palm key point and the secondpalm key point. After the distance between the first palm key point andthe third palm key point is determined, according to the existingproportional relationship, the first distance between the second palmkey point and the fourth palm key point can be determined. After thefirst palm key point, the second palm key point, and the third palm keypoint are detected subsequently, the center point of the palm, that is,the fourth palm key point can be determined.

The third preset value may be any value, such as 1.5 or 2. Afterdetermining the first palm key point and the third palm key point in thetarget hand image, the computer device may determine a distance betweenthe first palm key point and the third palm key point, and use a productof the distance and the third preset value as a first distance. Thefirst distance represents the distance between the second palm key pointand the fourth palm key point, and the fourth palm key point may bedetermined through the first distance subsequently.

In a possible implementation, step 3031 may include: determining adistance between the first palm key point and the third palm key pointaccording to coordinates of the first palm key point and coordinates ofthe third palm key point, and using a product of the distance and athird preset value as a first distance.

When performing key point detection on the target hand image, thecomputer device may determine coordinates of each palm key point in thetarget hand image. Therefore, the distance between the first palm keypoint and the third palm key point can be determined through thecoordinates of the first palm key point and the coordinates of the thirdpalm key point.

3032: The computer device determines a fourth palm key point accordingto the first distance.

The fourth palm key point may be used to represent the center point ofthe palm. The distance between the fourth palm key point and the secondpalm key point is equal to the first distance, and the straight lineformed by the first palm key point and the third palm key point isperpendicular to the straight line formed by the second palm key pointand the fourth palm key point.

For example, during determination of the fourth palm key point, thestraight line formed by the first palm key point and the third palm keypoint is used as an X axis of a coordinate axis, and the straight linepassing through the second palm key point and perpendicular to the Xaxis is used as a Y axis of the coordinate axis. A first direction fromthe first palm key point to the third palm key point is used as apositive direction of the X axis, and rotation is performed by 90degrees counterclockwise in the first direction to obtain a seconddirection. The second direction is used as a positive direction of the Yaxis. Along a negative direction of the Y axis, a palm key pointseparated from the second palm key point by the first distance is usedas the fourth palm key point. The positional relationship between thefirst palm key point, the second palm key point, the third palm keypoint, the fourth palm key point, and the coordinate axis is shown inFIG. 5.

For example, the first palm key point is the gap key point between theindex finger and the middle finger, the second palm key point is the gapkey point between the middle finger and the ring finger, and the thirdpalm key point is the gap key point between the ring finger and thelittle finger. The fourth palm key point determined through the firstpalm key point, the second palm key point, and the third palm key pointis the center point of the palm.

3033: The computer device uses a product of the distance between thefirst palm key point and the third palm key point and a fourth presetvalue as a second distance, and then performs step 3034 or 3035.

In this embodiment of this disclosure, the fourth preset value isestimated by integrating a ratio of the distance between the first palmkey point and the third palm key point to a size of the palm of theordinary person. The size of the region where the palm is located may bedetermined through the distance between the first palm key point and thethird palm key point and the fourth preset value subsequently.

The fourth preset value may be any value, such as 1.2 or 7/6. Afterdetermining the first palm key point and the third palm key point in thetarget hand image, the computer device may determine a distance betweenthe first palm key point and the third palm key point, and use a productof the distance and the fourth preset value as a second distance. Thetarget region may be determined through the second distancesubsequently.

3034: The computer device determines a square target region with thefourth palm key point as a center of the target region and the seconddistance as a side length of the target region.

The fourth palm key point is used as the center and the second distanceis used as the side length, so that the square target region in thetarget hand image can be obtained. To ensure the accuracy of theobtained target region, any side of the square target region is parallelto the straight line formed by the first palm key point and the thirdpalm key point, thereby ensuring the integrity of the palm that thetarget region can cover, which improves the accuracy of a target palmprint feature obtained subsequently.

3035: The computer device determines a circular target region with thefourth palm key point as the center of the target region and the seconddistance as a radius of the target region.

With the fourth palm key point as the center of the target region andthe second distance as the radius of the target region, the circularregion can be determined, and the circular region is used as the targetregion.

When the palm extraction model is called to obtain the target palmimage, the target region is determined through the detected palm keypoints, which improves the accuracy of the determined target region andfurther improves the accuracy of the extracted target palm image.

304: The computer device performs palm extraction on the target regionof the target hand image to obtain a target palm image.

Since the target region is the region where the palm is located, and thetarget region includes the palm prints of the palm, a palm imageincluding the palm may be obtained by performing palm extraction on thetarget region. When palm extraction is performed on the target region,the target region of the target hand image may be cropped to obtain thetarget palm image.

This embodiment of this disclosure is described by determining thetarget region where the palm is located and obtaining the target palmimage. In another embodiment, steps 302 to 304 are not required, andpalm extraction may be directly performed on the target hand image toobtain the target palm image of the target hand image.

305: The computer device calls the feature extraction model to performfeature extraction on the target palm image, to obtain a target palmprint feature.

Since the target palm image includes the palm prints of the palm, bycalling the feature extraction model to perform feature extraction onthe target palm image, a palm print feature of the palm in the targetpalm image can be obtained, that is, a palm print feature of the palm inthe target hand image. The palm print feature may include a plurality offeature dimensions, for example, a 512-dimensional palm print feature.

306: According to similarities between the target palm print feature andeach preset palm print feature, the computer device identifies a presetpalm print feature with a largest similarity to the target palm printfeature among the plurality of preset palm print features as a similarpalm print feature.

A similarity between the target palm print feature and a preset palmprint feature is used to indicate the similarity between the target palmprint feature and the preset palm print feature. A higher similarityindicates a larger possibility that the target palm print feature andthe preset palm print feature belong to the same user, and a lowersimilarity indicates a smaller probability that the target palm printfeature and the preset palm print feature belong to the same user.

After the target palm print feature is obtained, similarities betweenthe target palm print feature and each preset palm print feature areobtained, thereby obtaining a plurality of similarities. A largestsimilarity is selected from the determined plurality of similarities,and a preset palm print feature corresponding to the largest similarityis identified as a similar palm print feature. It may be considered thatthe similar palm print feature and the target palm print feature belongto the same user identifier. The similarity between the target palmprint feature and the preset palm print feature may be determined usingcosine similarity, Euclidean distance, or the like.

Since there are a plurality of preset palm print features stored in thecomputer device, and the plurality of preset palm print features may bepalm print features registered by plurality of user identifiers, asimilarity between a target palm print feature to be recognized and eachpreset palm print feature may be determined to determine a possibilitythat the plurality of preset palm print features stored in the computerdevice and the target palm print feature belong to the same useridentifier, thereby obtaining a similar palm print feature most similarto the target user identifier.

The target palm print feature is compared with each preset palm printfeature one by one, and the target user identifier is determinedaccording to the similarities of the palm print features, which improvesthe accuracy of the determined target user identifier.

In addition, when the computer device is a terminal, the plurality ofpreset palm print features may be delivered to the terminal by theserver, and the terminal stores the plurality of preset palm printfeatures. When the computer device is a server, the plurality of presetpalm print features may be obtained by the server performing palm printextraction on hand images sent by plurality of terminals, or may beobtained by receiving preset palm print features sent by plurality ofterminals, and the server stores the plurality of preset palm printfeatures.

For example, when the computer device is a terminal, and a plurality ofusers perform palm print registration, a user terminal sends hand imagesand corresponding user identifiers to the server, and the serverperforms palm extraction on the plurality of hand images to obtain palmprint features of the plurality of users. The palm print features of theplurality of users and the corresponding user identifiers are deliveredto the terminal, and the terminal stores the plurality of palm printfeatures and the corresponding user identifiers correspondingly.Alternatively, when the computer device is a server, and a plurality ofusers perform palm print registration, a user terminal sends hand imagesand corresponding user identifiers to the server, and the serverperforms palm extraction on the plurality of hand images to obtain palmprint features of the plurality of users. The server stores theplurality of palm print features and corresponding user identifierscorrespondingly. Alternatively, when the computer device is a server,and a plurality of users perform palm print registration, palm printextraction is performed on obtained hand images through a user terminalto obtain corresponding palm print features. The corresponding palmprint features are sent to the server through the user terminal, and theserver stores the received palm print features and corresponding useridentifiers correspondingly.

307: The computer device determines a user identifier corresponding tothe similar palm print feature as a target user identifier of the targetpalm print feature.

Since the computer device stores a plurality of preset palm printfeatures and a user identifier of each preset palm print feature, thecomputer device selects the similar palm print feature from theplurality of preset palm print features to obtain the user identifier ofthe similar palm print feature. In addition, when it is determined thatthe similar palm print feature and the target palm print feature belongto the same user identifier, the user identifier corresponding to thesimilar palm print feature is determined as the user identifiercorresponding to the target palm print feature, that is, the target useridentifier corresponding to the target hand image.

In this embodiment, the target user identifier is determined accordingto the similarity between the target palm print feature and each presetpalm print feature. However, in another embodiment, steps 306 and 307are not required, and recognition processing is performed on the targetpalm print feature according to a plurality of preset palm printfeatures and user identifiers corresponding to the preset palm printfeatures, to determine a target user identifier of the target handimage. The recognition processing manner may be other manners differentfrom the foregoing steps 306 and 307, and this is not limited in thisapplication.

This embodiment of this disclosure is described by determining thetarget region where the palm is located and obtaining the target palmimage. In another embodiment, steps 302 to 304 are not required, and thepalm extraction model may be called to perform palm extraction on thetarget hand image to obtain the target palm image of the target handimage. The palm extraction model is a model for extracting palm imagesof the user, which may be obtained through pre-training.

This embodiment is only described by determining the user identifier byusing the obtained target hand image. In another embodiment, step 301may include: acquiring a target hand image in response to a resourcetransfer request. The resource transfer request indicates that resourcetransfer needs to be performed, and the resource transfer request maycarry a quantity of resources to be transferred, and may further carryan account to which the resources are to be transferred, and the like.

In a possible implementation, after determining the target useridentifier of the target hand image, the method further includes:transferring resources of the target user identifier based on theresource transfer request.

For example, an account of the target user identifier (which isessentially the user identified by the target user identifier) isdetermined. The resource transfer request carries the quantity ofresources to be transferred and the account to which the resources areto be transferred. From the account of the target user identifier, theresources of the quantity are transferred to the account to which theresources are to be transferred, to complete the transfer of theresources of the target user identifier.

As a type of biological feature, palm prints are as unique anddistinguishable as biological features such as face, iris, andfingerprints. Compared with the human face that is currently widely usedin identity verification, payment, access control, ride-hailing, andother fields, palm prints are not affected by makeup, masks, sunglasses,or the like, which can improve the accuracy of user identityverification. In some scenarios, such as epidemic prevention and controlscenarios, it is necessary to wear a mask to cover the mouth and nose.In this case, using palm prints for identity verification can be abetter choice.

Cross-device registration recognition is a capability that is veryimportant to the user experience. For associated two types of devices, auser may register in one type of device, bind a user identifier of theuser to a palm print feature of the user, and then perform identityverification on the other type of device. Since mobile phones andInternet of Things devices have large differences in image style andimage quality, through cross-device registration and recognition, usersmay use an Internet of Things device directly after registering on amobile phone, without the need for users to register on the two types ofdevices. For example, after a user registers through a mobile phone, theuser may directly perform identity verification on a device of a store,without the need for the user to register on the device of the store,thereby avoiding leakage of information of the user.

In the method provided in this embodiment of this disclosure, the palmimage is extracted from the obtained hand image, so that influencingfactors on the palm print feature in the hand image are reduced, and thepalm of the hand image is highlighted. In this way, the featureextraction model can accurately extract the palm print feature in thepalm image, which improves the accuracy of the palm print feature.Therefore, the corresponding user identifier can be accuratelydetermined according to the obtained palm print feature, and theaccuracy of the obtained user identifier is improved. In addition, sincethe sample hand images used in training the feature extraction model areacquired by different types of devices, the feature extraction model canadapt to hand images acquired by various types of devices, and has awide range of application. In addition, the trained feature extractionmodel can accurately perform feature extraction on hand images capturedby various types of devices, which improves the robustness of thefeature extraction model.

FIG. 6 is a flowchart of a palm print recognition method according tothis application. As shown in FIG. 6, the method includes:

1. When a user identifier is determined, a palm of a user isphotographed through an device such as an Internet of Things device toobtain a target hand image.

2. Call a palm extraction model, and obtain a target palm image byperforming palm extraction (for example, palm key point detection) onthe target hand image.

3: Call a feature extraction model to perform feature extraction on thetarget palm image, to obtain a target palm print feature.

4. Arrange similarities between the target palm print feature and eachpreset palm print feature in descending order, determine a useridentifier of a similar palm print feature corresponding to a largestsimilarity, identify the user identifier as a target user identifier,and output the recognition result.

Based on the foregoing embodiment, an embodiment of this disclosurefurther provides a cross-device payment scenario. FIG. 7 is a flowchartof cross-device payment. Referring to FIG. 7, a cross-device paymentprocess involves a user terminal, a merchant terminal, and a paymentapplication server.

A payment application is installed on the user terminal. The userterminal logs in to the payment application based on the useridentifier, and establishes a communication connection with the paymentapplication server. Through the communication connection, the userterminal and the server may interact with each other. A paymentapplication is installed on the merchant terminal. The merchant terminallogs in to the payment application based on the user identifier, andestablishes a communication connection with the server. Through thecommunication connection, the merchant terminal and the server mayinteract with each other.

The cross-device payment process includes:

1. A user holds a user terminal at home, and a palm of the user isphotographed through the user terminal to obtain a hand image of theuser. The payment application logged in based on the user identifiersends a palm print registration request to the payment applicationserver. The palm print registration request carries the user identifierand the hand image.

2. The payment application server receives the palm print registrationrequest sent by the user terminal, processes the hand image to obtain apalm print feature of the hand image, stores the palm print feature andthe user identifier correspondingly, and sends a palm print bindingsuccess notification to the user terminal.

After the payment application server stores the palm print feature andthe user identifier correspondingly, the palm print feature is used as apreset palm print feature. A corresponding user identifier may bedetermined through a stored preset palm print feature subsequently. Theprocess of obtaining the palm print feature of the hand image by thepayment application server is similar to the foregoing steps 302 to 305,and the details are not repeated herein.

3. The user terminal receives the palm print binding successnotification, displays the palm print binding success notification, andprompts the user that the palm prints are bound with the useridentifier.

The user completes the palm print registration through the interactionbetween the user terminal of the user and the payment applicationserver, and can automatically pay through the palm prints subsequently.

4. When the user purchases a commodity in a store for a transaction, amerchant terminal captures the palm of the user to obtain a hand image.A payment application logged in based on a merchant identifier sends apayment request to the payment application server. The payment requestcarries the merchant identifier, a consumption amount, and the handimage.

5. After receiving the payment request, the payment application serverprocesses the hand image, determines a user identifier of the handimage, determines an account of the user identifier in the paymentapplication, completes the transfer through the account, and sends apayment completion notification to the merchant terminal to the merchantafter the transfer is completed.

After using the user terminal to register the palm prints, the user candirectly make payment through the palm prints at the merchant terminal,without the need for the user to register the palm prints on themerchant terminal, thereby implementing cross-device palm printrecognition and improving the convenience. The process of obtaining theuser identifier by the payment application server is similar to theforegoing steps 302 to 307.

6. The merchant terminal receives the payment completion notification,displays the payment completion notification, and prompts the user thatthe payment is completed, so that the user and the merchant complete thetransaction of the item, and the user may take the item away.

In addition, in the process of implementing cross-device payment throughthe user terminal and the merchant terminal in the foregoing embodiment,the foregoing merchant terminal may be alternatively replaced by apayment device on a bus, to implement a cross-device bus paymentsolution according to the foregoing steps.

An embodiment of this disclosure further provides a cross-deviceidentity verification scenario, in which cross-device identityverification can be implemented. FIG. 8 is a flowchart of cross-deviceidentity verification. Referring to FIG. 8, a cross-device identityverification process involves a user terminal, an access control device,and an access control server.

The user terminal establishes a communication connection with an accesscontrol server, and through the communication connection, the userterminal may interact with the access control server. The access controldevice establishes a communication connection with the access controlserver, and through the communication connection, the access controldevice may interact with the access control server.

The cross-device identity verification process includes:

1. A user holds a user terminal at home, and a palm of the user isphotographed through the user terminal to obtain a hand image of theuser. A palm print registration request is sent to the access controlserver. The palm print registration request carries the user identifierand the hand image.

2. The access control server receives the palm print registrationrequest sent by the user terminal, processes the hand image to obtain apalm print feature of the hand image, stores the palm print feature andthe user identifier correspondingly, and sends a palm print bindingsuccess notification to the user terminal.

After the access control server stores the palm print feature and theuser identifier correspondingly, the palm print feature may be used as apreset palm print feature. A corresponding user identifier may bedetermined through a stored preset palm print feature subsequently. Theprocess of obtaining the palm print feature of the hand image by theaccess control server is similar to the foregoing steps 302 to 305.

3. The user terminal receives the palm print binding successnotification, displays the palm print binding success notification, andprompts the user that the palm prints are bound with the useridentifier.

The user completes the palm print registration through the interactionbetween the user terminal of the user and the access control server, andthe door can be opened automatically through the palm printssubsequently.

4. When the user goes home, the access control device captures the palmof the user, obtains a verified hand image of the user, and sends anidentity verification request to the access control server, where theidentity verification request carries the verified hand image.

5. The access control server receives the identity verification requestsent by the access control device, performs recognition processing onthe verified hand image, obtains a user identifier of the hand image,determines that the user is a registered user, and sends a verificationpass notification to the access control device.

The process of obtaining the user identifier by the access controlserver is similar to the foregoing steps 302 to 307.

6. The access control device receives the verification pass notificationsent by the access control server, and controls the door to openaccording to the verification pass notification so that the user canenter the room.

The foregoing embodiment is a process of implementing cross-deviceidentity verification through the user terminal and the access controldevice, and may be further applied to a cross-device check-in scenario.A cross-device check-in process involves a user terminal, a check-indevice, and a check-in server. The user terminal and the check-in deviceinteract with the check-in server respectively to implement the solutionof cross-device check-in.

As can be learned from the foregoing cross-device payment scenarios andcross-device identity verification scenarios, as shown in FIG. 9,whether for the palm print registration stage of the interaction betweenthe user terminal and the server, or the palm print recognition stage ofthe interaction with the server through other terminal devices, afterthe user terminal or other terminal devices obtains the hand image, thehand image is sent to the server. The server calls the palm extractionmodel to extract the palm image, and calls the feature extraction modelto obtain the palm print feature. In addition, in the palm printrecognition stage, the server obtains the recognition result of thecurrent user by comparing the palm print feature with the preset palmprint feature.

Based on the embodiment shown in FIG. 3, before the feature extractionmodel is called, the feature extraction model needs to be trained. Fordetails of the training process, refer to the following embodiment.

FIG. 10 is a flowchart of a method for training a feature extractionmodel according to an embodiment of this disclosure. The method isapplicable to a computer device. As shown in FIG. 10, the methodincludes:

1001: The computer device obtains sample hand images of a plurality ofsample user identifiers.

The sample hand image includes a palm of a sample user identifier, andthe palm may be a left palm of the sample user identifier (i.e., theuser identified by the sample user identifier) or a right palm of thesample user identifier. The sample hand image may be obtained byphotographing the palm of the sample user identifier by the computerdevice, or may be sent by other devices.

A plurality of sample hand images of a same sample user identifier areacquired by different types of devices featuring different imagedefinition/resolution. Different types of devices may include mobilephones and Internet of Things devices. The Internet of Things devicesmay be palm print payment terminals, merchant payment terminals, and thelike. Since the quality of sample hand images acquired by differenttypes of devices for a palm of a same sample user identifier isdifferent, there may be sample hand images with high definition, andsample hand images with low definition. Therefore, the featureextraction model is trained according to sample hand images acquired bydifferent types of devices, so that the trained feature extraction modelcan perform feature extraction on the sample hand images acquired bydifferent types of devices, thereby having a wide range of application,and improving the accuracy of the feature extraction model.

For example, eight sample hand images of any sample user identifier areobtained, where four sample hand images are obtained by photographing apalm of the sample user identifier with a mobile phone, and four samplehand images are obtained by photographing the palm of the sample useridentifier through an Internet of Things device.

1002. The computer device calls a feature extraction model to performfeature extraction according to the sample hand images, to obtain samplepalm print features.

The feature extraction model is an initialized feature extraction model,and is configured to perform feature extraction according to the samplehand images, to obtain sample palm print features.

In addition to the palm, the sample hand image obtained by the computerdevice may further include other information, such as a finger of theuser and a shooting scene. Therefore, to avoid the impact of otherinformation in the sample hand image, the palm in the sample hand imageis highlighted, to improve the accuracy of the palm print featureobtained subsequently. In a possible implementation, the implementationof S1002 may be: performing palm extraction on each sample hand image toobtain a sample palm image of each sample hand image, and calling thefeature extraction model to perform feature extraction on the samplepalm image, to obtain a sample palm print feature. Therefore, samplepalm images of the plurality of sample user identifiers can be obtained.Each sample user identifier includes a plurality of sample hand images,and a plurality of sample palm images of each sample user identifier isobtained.

As shown in FIG. 11, figures (1) and (2) are hand images acquired by themobile phone, figures (3) and (4) are hand images acquired by theInternet of Things device, figure (5), figure (6), figure (7), andfigure (8) are palm images corresponding to figure (1), figure (2),figure (3) and figure (4) respectively. The hand images acquired bydifferent devices have different definition, resulting in differentquality of palm prints displayed in the obtained palm images. As shownin FIG. 12, a palm image in the upper left corner is obtained byphotographing a palm of user 1 by a mobile phone, and a palm image inthe upper right corner is obtained by photographing the palm of user 1by another camera. As can be learned by comparing the two palm images,there are differences in the palm prints in the palm images acquired bydifferent types of devices for the palm of the same user. A palm imagein the lower left corner is obtained by photographing a palm of user 2by a mobile phone, and a palm image in the lower right corner isobtained by photographing the palm of user 2 by another camera. As canbe learned by comparing the two palm images, there are differences inthe palm prints in the palm images acquired by different types ofdevices for the palm of the same user.

In a possible implementation, the computer device may call a palmextraction model to perform palm extraction on each sample hand image toobtain the sample palm images of the plurality of sample useridentifiers. The palm extraction model is a pre-trained model configuredto obtain palm images.

The feature extraction model is called to perform feature extraction oneach sample palm image, to obtain a sample palm print feature of eachsample palm image, so that the feature extraction model can be trainedthrough a plurality of obtained sample palm print features subsequently.

1003: The computer device trains the feature extraction model accordingto the sample palm print features of the plurality of sample useridentifiers.

When S1003 is performed, a loss value of the feature extraction modelmay be determined first according to the sample palm print features ofthe plurality of sample user identifiers; and the feature extractionmodel may be trained according to the obtained loss value.

In the case of performing palm extraction on each sample hand image toobtain a sample palm image of each sample hand image, and calling thefeature extraction model to perform feature extraction on the samplepalm image, to obtain a sample palm print feature, the implementation ofS1003 may include the following steps:

1031: The computer device generates a plurality of positive sample imagecombinations and a plurality of negative sample image combinationsaccording to the sample palm images of the plurality of sample useridentifiers.

The positive sample image combination includes two sample palm imagesbelonging to a same sample user identifier, and the negative sampleimage combination includes two sample palm images respectively belongingto different sample user identifiers.

For a plurality of sample palm images of any sample user identifier, theplurality of sample palm images are combined in pairs to obtain aplurality of positive sample image combinations of the sample useridentifier. The sample palm images of each sample user identifier arerespectively combined to obtain positive sample image combinations ofeach sample user identifier.

For example, if any sample user identifier corresponds to sample palmimage 1, sample palm image 2, and sample palm image 3, an obtainedpositive sample image combination A includes sample palm image 1 andsample palm image 2, a positive sample image combination B includessample palm image 1 and sample palm image 3, and a positive sample imagecombination C includes sample palm image 2 and sample palm image 3.

For sample palm images of any two sample user identifiers in theplurality of sample user identifiers, one sample palm image of onesample user identifier is combined with another sample palm image of theother sample user identifier, to obtain a plurality of negative sampleimage combinations corresponding to the two sample user identifiers.Sample palm images of each two sample user identifiers are combined inpairs, thereby obtaining a plurality of negative sample imagecombinations.

For example, if a first sample user identifier corresponds to samplepalm image 1 and sample palm image 2, and the second sample useridentifier corresponds to sample palm image 3 and sample palm image 4,an obtained negative sample image combination A may include sample palmimage 1 and sample palm image 3, a negative sample image combination Bmay include sample palm image 1 and sample palm image 4, a negativesample image combination C includes sample palm image 2 and sample palmimage 3, and a negative sample image combination D includes sample palmimage 2 and sample palm image 4.

This embodiment of this disclosure is described by obtaining the samplepalm print features of the sample palm images first, and then generatingthe positive sample image combinations and the negative sample imagecombinations. In another embodiment, the step of generating a pluralityof positive sample image combinations and a plurality of negative sampleimage combinations may be performed before the step of performingfeature extraction on each sample palm image to obtain a sample palmprint feature.

1032: The computer device obtains a similarity of each positive sampleimage combination and a similarity of each negative sample imagecombination according to the obtained sample palm print features of theplurality of sample palm images.

The similarity of the positive sample image combination represents asimilarity between sample palm print features of two sample palm imagesin the positive sample image combination, and the similarity of thenegative sample image combination represents a similarity between samplepalm print features of two sample palm images in the negative sampleimage combination.

Since both the positive sample image combination and the negative sampleimage combination include two sample palm images, sample palm printfeatures of two sample palm images in each sample image combination arecompared to determine a similarity of each sample image combination. Thesimilarity of the sample image combination may be obtained by usingmethods such as Euclidean distance and cosine similarity.

In a possible implementation, this step may include: for any positivesample image combination p (i,j), obtaining a similarity sim (p(i,j)) ofthe positive sample image combination p (i,j) according to sample palmfeatures of two sample palm images included in the positive sample imagecombination, and the following relationship is met:

sim(p(i,j))=cos_(sim)[F(x _(p(i))),F(x _(p(j)))]

p∈1, . . . ,m,i,j∈1, . . . ,N,i≠j,

where p represents a p^(th) sample user identifier among a plurality ofsample user identifiers; m represents a total quantity of the pluralityof sample user identifiers; i represents an i^(th) sample palm image inthe N sample palm images corresponding to the sample user identifier p,j represents a j^(th) sample palm image in the N sample palm imagescorresponding to the sample user identifier p, i is not equal to j, andN represents a total quantity of sample palm images corresponding to thesample user identifier p; x_(p(i)) represents an i^(th) sample palmimage of the sample user identifier p; x_(p(j)) represents a j^(th)sample palm image of the sample user identifier p; F(x_(p(i)))represents a sample palm feature of an i^(th) sample palm image of thesample user identifier p; F(x_(p(j))) represents a sample palm featureof a j^(th) sample palm image of the sample user identifier p; andcos_(sim)[ ] is a cosine similarity function used to obtain a similaritybetween two sample palm features.

In a possible implementation, this step may include: for any negativesample image combination p, q (i,j), obtaining a similarity sim (p, q(i,j)) of the negative sample image combination p, q (i,j) according tosample palm features of two sample palm images included in the negativesample image combination, and the following relationship is met:

sim(p,q(i,j))=cos_(sim)[F(x _(p(i))),F(x _(q(j)))]

p∈1, . . . ,m,q∈1, . . . ,m,

where p represents a p^(th) sample user identifier among m sample useridentifiers; q represents a q^(th) sample user identifier among m sampleuser identifiers, the q^(th) sample user identifier being different fromthe p^(th) sample user identifier; m represents a total quantity of theplurality of sample user identifiers; i represents an i^(th) sample palmimage in the plurality of sample palm images corresponding to the sampleuser identifier p, and j represents a j^(th) sample palm image in theplurality of sample palm images corresponding to the sample useridentifier q; x_(p(i)) represents an i^(th) sample palm image of thesample user identifier p; x_(q(j)) represents a j^(th) sample palm imageof the sample user identifier q; F(x_(p(i))) represents a sample palmfeature of an i^(th) sample palm image of the sample user identifier p;and F (x_(q(j))) represents a sample palm feature of a j^(th) samplepalm image of the sample user identifier p; and cos_(sim)[ ] is a cosinesimilarity function used to obtain a similarity between two sample palmfeatures.

1033: The computer device determines the loss value of the featureextraction model according to the similarities of the plurality ofpositive sample image combinations and the similarities of the pluralityof negative sample image combinations.

This loss value is used to represent an error of the feature extractionmodel. In this embodiment of this disclosure, the loss value of thefeature extraction model is determined, so that the loss value may beused to train the feature extraction model to reduce the loss valuesubsequently.

Since sample palm images in a positive sample image combination belongto a same sample user identifier, a theoretical similarity of thepositive sample image combination is to be large enough; and sincesample palm images in a negative sample image combination do not belongto a same sample user identifier, a theoretical similarity of thenegative sample image combination is to be small enough. For example, ifa value range of the similarity is [0, 1], the theoretical similarity ofthe positive sample image combination is 1, and the theoreticalsimilarity of the negative sample image combination is 0. However, sincesample palm images are obtained by different types of devices, for asame user identifier, the sample hand images of different quality resultin different quality of obtained sample palm images, that is, obtainedpalm print features may be different. Therefore, there is an errorbetween the obtained similarity of the positive sample image combinationand the corresponding theoretical similarity, and there is also an errorbetween the obtained similarity of the negative sample image combinationand the corresponding theoretical similarity. Through similarities of aplurality of positive sample image combinations and similarities of aplurality of negative sample image combinations, the loss value of thefeature extraction model is determined, so that the feature extractionmodel is subsequently trained to reduce the loss value, therebyimproving the accuracy of the feature extraction model.

In a possible implementation, this step may include the following fourmanners:

A first manner includes the following steps 1061 to 1063:

1061: Perform statistics on the similarities of the plurality ofpositive sample image combinations to obtain a first statistical valuecorresponding to the plurality of positive sample image combinations.

Since two sample palm images in a positive sample image combinationbelong to a same sample user identifier, and two sample palm images in anegative sample image combination do not belong to a same sample useridentifier, a real similarity of the positive sample image combinationis to be larger than a real similarity of the negative sample imagecombination. Therefore, the similarities of the plurality of positivesample image combinations and the similarities of the plurality ofnegative sample image combinations are processed, to determine the lossvalue of the feature extraction model.

The first statistical value is a comprehensive representation of thesimilarities of the plurality of positive sample image combinations,which may be a mean value, a sum value, a weighted average value, aweighted sum value, etc. of the similarities of the plurality ofpositive sample image combinations. Statistics is performed on thesimilarities of the plurality of positive sample image combinations, sothat the loss value of the feature extraction model can be determinedaccording to the first statistical value, and the similarities of theplurality of positive sample image combinations are comprehensivelyconsidered in the loss value, thereby improving the accuracy of thefeature extraction model.

In a possible implementation, step 1061 may include: determining a ratioof a sum of the similarities of the plurality of positive sample imagecombinations to a quantity of the plurality of positive sample imagecombinations as the first statistical value corresponding to theplurality of positive sample image combinations. The first statisticalvalue is then a mean value of the similarities of the plurality ofpositive sample image combinations.

In another possible implementation, step 1061 may include: determining asum of the similarities of the plurality of positive sample imagecombinations as the first statistical value corresponding to theplurality of positive sample image combinations. The first statisticalvalue is then a sum value of the similarities of the plurality ofpositive sample image combinations.

1062: Perform statistics on the similarities of the plurality ofnegative sample image combinations to obtain a second statistical valuecorresponding to the plurality of negative sample image combinations.

The second statistical value is a comprehensive representation of thesimilarities of the plurality of negative sample image combinations,which may be a mean value, a sum value, a weighted average value, aweighted sum value, etc. of the similarities of the plurality ofnegative sample image combinations. Statistics is performed on thesimilarities of the plurality of negative sample image combinations, sothat the loss value of the feature extraction model can be determinedaccording to the first statistical value, and the similarities of theplurality of negative sample image combinations are comprehensivelyconsidered in the loss value, thereby improving the accuracy of thefeature extraction model.

In a possible implementation, step 1062 may include: determining a ratioof a sum of the similarities of the plurality of negative sample imagecombinations to a quantity of the plurality of negative sample imagecombinations as the second statistical value corresponding to theplurality of negative sample image combinations. The second statisticalvalue is then a mean value of the similarities of the plurality ofnegative sample image combinations.

In another possible implementation, step 1062 may include: determining asum of the similarities of the plurality of negative sample imagecombinations as the second statistical value corresponding to theplurality of negative sample image combinations. The second statisticalvalue is then a sum value of the similarities of the plurality ofnegative sample image combinations.

1063: Determine a difference between the second statistical value andthe first statistical value as the loss value of the feature extractionmodel.

The difference represents the difference between the similarities of thenegative sample image combinations and the similarities of the positivesample image combinations. As shown in FIG. 13, a negative value of adistance between a mean value of first distribution relationship dataand a mean value of second distribution relationship data is the lossvalue of the feature extraction model. In this case, the loss value ofthe feature extraction model may be referred to as a first loss value.

The second statistical value is obtained by performing statistics on thesimilarities of the plurality of negative sample image combinations, andthe first statistical value is obtained by performing statistics on thesimilarities of the plurality of positive sample image combinations, andreal similarities of the positive sample image combinations are largerthan real similarities of the negative sample image combinations.Therefore, the difference is used as the loss value of the featureextraction model, so that the feature extraction model is trainedthrough the loss value subsequently, to reduce the loss value. Thedifference between the similarities of the positive sample imagecombinations and the similarities of the negative sample imagecombinations is increased, so that the similarities of the positivesample image combinations and the similarities of the negative sampleimage combinations can be distinguished, that is, the capability of thefeature extraction model for distinguishing extracted palm printfeatures is improved. Different palm print features can be extracted fordifferent palm images through the feature extraction model subsequently,and differences between different palm print features are large, so thatdifferent palm print features can be distinguished subsequently.

In a possible implementation, the first statistical value E (C_(sim) ¹),the second statistical value E(C_(sim) ²), and the first loss valueLoss_(mean) meet the following relationship:

Loss_(mean)=−α₃[E(C _(sim) ¹)−E(C _(sim) ²)]

where α₃ represents a weight parameter, and α₃ is a constant, such as0.1 or 0.2; C_(sim) ¹ represents a distribution of the similarities ofthe plurality of positive sample image combinations; and C_(sim) ²represents a distribution of the similarities of the plurality ofnegative sample image combinations.

According to the generated plurality of positive sample imagecombinations and plurality of negative sample image combinations, thefeature extraction model is trained, so that a distinguishing degreebetween different palm print features extracted by the obtained featureextraction model is increased, thereby improving the distinguishingdegree of the palm print features extracted by the feature extractionmodel, and further improving the accuracy of the feature extractionmodel.

A second manner includes the following steps 1064 to 1067:

1064: Determine first distribution relationship data according to thesimilarities of the plurality of positive sample image combinations.

The first distribution relationship data represents a distribution ofthe similarities of the plurality of positive sample image combinations,and the first distribution relationship data may be Gaussiandistribution relationship data or histogram distribution relationshipdata. Statistical analysis is performed on the similarities of theplurality of positive sample image combinations, so that thedistribution of the similarities of the plurality of positive sampleimage combinations can be obtained, thereby obtaining the firstdistribution relationship data.

In a possible implementation, the first distribution relationship datameets the following relationship:

${h(t)} = {\sum\limits_{{{({i,j})}:m_{ij}} = 1}{\frac{1}{|{sim}|}\delta_{i,j,t}}}$δ_(i, j, t) = e^(−ζ[sim(i, j) − hn_(t)])

where m represents a total quantity of the plurality of sample useridentifiers, and m_(ij)=1 represents the positive sample imagecombinations; (i,j):m_(ij)=1 represents all positive sample imagecombinations formed by sample hand images of a plurality of sample useridentifiers; for any sample user identifier, (i,j) represents aplurality of positive sample image combinations formed by differentsample palm images of the sample user identifier; |sim| represents anabsolute value of a similarity of any positive sample image combination;δ_(i,j,t) represents a variable in the first distribution relationshipdata; e represents a natural constant; ζ represents an extendedparameter of the Gaussian kernel function, ζ being a constant; sim (i,j)represents a similarity of any positive sample image combination; andhn_(t) is a variable in the first distribution relationship data, whichrepresents a t^(th) node in the first distribution relationship data.

1065: Obtain a mean value of the similarities of the plurality ofpositive sample image combinations to obtain an original statisticalvalue corresponding to the plurality of positive sample imagecombinations, and add a first preset value to the original statisticalvalue to obtain a target statistical value corresponding to theplurality of positive sample image combinations.

The original statistical value is the mean value of the similarities ofthe plurality of positive sample image combinations, and the firstpreset value may be any value, such as 0.05 or 0.1. The targetstatistical value is an expected value of the mean value of thesimilarities of the plurality of positive sample image combinations,that is, the expected statistical value that the original statisticalvalue can reach. The first preset value is added to the originalstatistical value to obtain the target statistical value correspondingto the plurality of positive sample image combinations, so that thefeature extraction model can be adjusted according to the targetstatistical value subsequently.

In a possible implementation, the original statistical value μ_(C1)corresponding to the plurality of positive sample image combinations,the first preset value r, and the target statistical value μ_(T1)corresponding to the plurality of positive sample image combinationsmeet the following relationship:

μ_(T1)=μ_(C1) +r

1066: Determine first target distribution relationship data by using thetarget statistical value as a mean value and a second preset value as astandard deviation.

The second preset value may be any value, such as 0.01 or 0.05. Thefirst target distribution relationship data is used to represent anexpected distribution of the similarities of the plurality of positivesample image combinations. The first target distribution relationshipdata may be Gaussian distribution relationship data, or otherdistribution relationship data. After the mean value and the standarddeviation are determined, an expected distribution that the similaritiesof the plurality of positive sample image combinations can achieve maybe determined, that is, the first target distribution relationship data.

1067: Determine the loss value of the feature extraction model accordingto a difference between the first distribution relationship data and thefirst target distribution relationship data.

The first distribution relationship data represents the currentdistribution of the similarities of the plurality of positive sampleimage combinations, and the first target distribution relationship datarepresents the expected distribution of the similarities of theplurality of positive sample image combinations. The difference betweenthe first distribution relationship data and the first targetdistribution relationship data, that is, the difference between thedistribution of the similarities of the plurality of positive sampleimage combinations and the expected distribution, is determined, and thedifference is determined as the loss value of the feature extractionmodel, so that the model can be adjusted subsequently the loss value ofthe feature extraction model can be reduced, and the difference betweenthe first distribution relationship data and the first targetdistribution relationship data is reduced. In this way, the distributionof the similarities of the plurality of positive sample imagecombinations meets the expected distribution, thereby improving theaccuracy of the feature extraction model. In this case, the loss valueof the feature extraction model may be referred to as a second lossvalue.

In a possible implementation, the first distribution relationship dataC_(sim) ¹, the first target distribution relationship data T_(sim) ¹,and the second loss value D_(KL) (T_(sim) ¹∥C_(sim) ¹) meet thefollowing relationship:

$ {{{D_{KL}( T_{sim}^{1} }}C_{sim}^{1}} ) = {\sum\limits_{s}{{T_{sim}^{1}(s)}\log\frac{T_{sim}^{1}(s)}{C_{sim}^{1}(s)}}}$

8 represents a serial number of the positive sample image combinations,C_(sim) ¹ (s) represents a similarity of an s^(th) positive sample imagecombination, and T_(sim) ¹ (s) represents a target similaritycorresponding to the s^(th) positive sample image combination in thefirst target distribution relationship data T_(sim) ¹.

A third manner includes the following steps 1068 to 1072:

1068: Determine first distribution relationship data according tosimilarities of a plurality of positive sample image combinations in afirst training round.

In this embodiment of this disclosure, the feature extraction model istrained through a plurality of training rounds, sample hand images usedin each training round are different, and a currently ongoing traininground may be denoted as a first training round. Sample hand images usedin different training rounds may be completely different or partiallydifferent. For example, sample hand image 1, sample hand image 2, andsample hand image 3 of sample user identifier A are used in the firsttraining round, and sample hand image 3, sample hand image 4, and samplehand image 5 of sample user identifier A are used in a second traininground; or sample hand image 1, sample hand image 2, and sample handimage 3 of sample user identifier A are used in the first traininground, and sample hand image 1, sample hand image 2, and sample handimage 4 of sample user identifier A are used in a second training round.

In addition, since different positive sample image combinations mayinclude the same sample hand images, the positive sample imagecombinations used in the plurality of training rounds of the featureextraction model are different, that is, the positive sample imagecombinations used in different training rounds may be completelydifferent or partially different. For example, in the first traininground, positive sample image combination A includes sample hand image 1and sample hand image 2, and positive sample image combination Bincludes sample hand image 3 and sample hand image 4; and in the secondtraining round, positive sample image combination C includes sample handimage 1 and sample hand image 3, and positive sample image combination Dincludes sample hand image 3 and sample hand image 2.

For any training round, a loss value of the feature extraction model isdetermined by using positive sample image combinations corresponding toused sample hand images, so that the feature extraction model can betrained through the loss value subsequently.

The first distribution relationship data represents the distribution ofthe similarities of the plurality of positive sample image combinations.

1069: Obtain a mean value of the similarities of the plurality ofpositive sample image combinations in the first training round to obtainan original statistical value corresponding to the plurality of positivesample image combinations.

In this embodiment of this disclosure, in each training round, thefeature extraction model needs to be called to perform featureextraction on the sample hand images used in the first training round,to obtain the similarities of the plurality of positive sample imagecombinations in the first training round. The subsequent process ofobtaining the original statistical value of the first training roundthrough the similarities of the plurality of positive sample imagecombinations in the first training round is similar to the foregoingstep 1065, and the details are not repeated herein.

1070: Add a first preset value to a target statistical valuecorresponding to a plurality of positive sample image combinations in asecond training round, to obtain a target statistical valuecorresponding to the plurality of positive sample image combinations inthe first training round.

The second training round is a previous training round of the firsttraining round, and the first preset value may be any value, such as0.05 or 0.1. The target statistical value is an expected value of theoriginal statistical value of the first training round, that is, anexpected value that the mean value of the similarities of the pluralityof positive sample image combinations can reach after the featureextraction model is trained in the first training round.

In this embodiment of this disclosure, the training process of thefeature extraction model is divided into a plurality of training rounds,and target statistical values are respectively set for each traininground, so that the feature extraction model can be trained step by stepsubsequently, and thus the accuracy of the feature extraction model canbe gradually improved, thereby ensuring the stability of training thefeature extraction model and improving the accuracy of the obtainedfeature extraction model.

This embodiment of this disclosure is described by determining thetarget statistical value in the case that the first training round isnot the first round of the training. When the first training round isthe first round of the training among the plurality of training rounds,the first preset value is added to the original statistical value of thefirst training round as the target statistical value of the firsttraining round, that is, the foregoing step 1065 is used, to obtain thetarget statistical value of the first training round.

1071: Determine first target distribution relationship data by using thetarget statistical value corresponding to the plurality of positivesample image combinations in the first training round as a mean valueand a second preset value as a standard deviation.

This step is similar to step 1066, and details are not described herein.

1072: Determine the loss value of the feature extraction model accordingto a difference between the first distribution relationship data and thefirst target distribution relationship data.

This step is similar to step 1067, and details are not described herein.

A fourth manner includes the following steps 1073 to 1076:

1073: Determine second distribution relationship data according to thesimilarities of the plurality of negative sample image combinations.

The second distribution relationship data represents a distribution ofthe similarities of the plurality of negative sample image combinations,and the second distribution relationship data may be Gaussiandistribution relationship data or histogram distribution relationshipdata. Statistical analysis is performed on the similarities of theplurality of negative sample image combinations, so that thedistribution of the similarities of the plurality of negative sampleimage combinations can be obtained, thereby obtaining the seconddistribution relationship data.

In a possible implementation, the second distribution relationship datameets the following relationship:

${h(t)} = {\sum\limits_{{{({i,j})}:m_{ij}} = {- 1}}{\frac{1}{|{sim}|}\delta_{i,j,t}}}$δ_(i, j, t) = e^(−ζ[sim(i, j) − hn_(t)])

where m represents a total quantity of the plurality of sample useridentifiers, and m_(ij)=−1 represents the negative sample imagecombinations; (i,j):m_(ij)=−1 represents all negative sample imagecombinations formed by sample hand images of a plurality of sample useridentifiers; for any two sample user identifiers, (i,j) represents aplurality of negative sample image combinations formed by sample palmimages of the two sample user identifier; |sim| represents an absolutevalue of a similarity of any negative sample image combination;δ_(i,j,t) represents a variable in the second distribution relationshipdata; e represents a natural constant; ζ represents an extendedparameter of the Gaussian kernel function, ζ being a constant; sim (i,j)represents a similarity of any negative sample image combination; andhn_(t) is a variable in the second distribution relationship data, whichrepresents a t^(th) node in the second distribution relationship data.

1074: Obtain a mean value of the similarities of the plurality ofnegative sample image combinations to obtain an original statisticalvalue corresponding to the plurality of negative sample imagecombinations, and subtract a first preset value from the originalstatistical value to obtain a target statistical value corresponding tothe plurality of negative sample image combinations.

The original statistical value is the mean value of the similarities ofthe plurality of negative sample image combinations, and the firstpreset value may be any value, such as 0.05 or 0.1. The targetstatistical value is an expected value of the mean value of thesimilarities of the plurality of negative sample image combinations,that is, the expected statistical value that the original statisticalvalue can reach. The first preset value is added to the originalstatistical value to obtain the target statistical value correspondingto the plurality of negative sample image combinations, so that thefeature extraction model can be adjusted according to the targetstatistical value subsequently.

In a possible implementation, the original statistical value μ_(C2)corresponding to the plurality of negative sample image combinations,the first preset value r, and the target statistical value μ_(T2)corresponding to the plurality of negative sample image combinationsmeet the following relationship:

μ_(T2)=μ_(C2) −r

1075: Determine second target distribution relationship data by usingthe target statistical value as a mean value and a second preset valueas a standard deviation.

The second target distribution relationship data may be Gaussiandistribution relationship data, or other distribution relationship data.After the mean value and the standard deviation are determined, anexpected distribution that the similarities of the plurality of negativesample image combinations can achieve may be determined, that is, thesecond target distribution relationship data.

1076: Determine the loss value of the feature extraction model accordingto a difference between the second distribution relationship data andthe second target distribution relationship data.

The second distribution relationship data represents the distribution ofthe similarities of the plurality of negative sample image combinations,and the second target distribution relationship data represents theexpected distribution of the similarities of the plurality of negativesample image combinations. The difference between the seconddistribution relationship data and the second target distributionrelationship data, that is, the difference between the distribution ofthe similarities of the plurality of negative sample image combinationsand the expected distribution, is determined, and the difference isdetermined as the loss value of the feature extraction model, so thatthe model can be adjusted subsequently the loss value of the featureextraction model can be reduced, and the difference between the seconddistribution relationship data and the second target distributionrelationship data is reduced. In this way, the distribution of thesimilarities of the plurality of negative sample image combinationsmeets the expected distribution, thereby improving the accuracy of thefeature extraction model. In this case, the loss value of the featureextraction model may be referred to as a third loss value.

In a possible implementation, the first distribution relationship dataC_(sim) ², the first target distribution relationship data T_(sim) ²,and the third loss value D_(KL) (T_(sim) ²∥C_(sim) ²) meet the followingrelationship:

$ {{{D_{KL}( T_{sim}^{2} }}C_{sim}^{2}} ) = {\sum\limits_{s}{{T_{sim}^{2}(s)}\log\frac{T_{sim}^{2}(s)}{C_{sim}^{2}(s)}}}$

s represents a serial number of the positive sample image combinations,C_(sim) ² (s) represents a similarity of an s^(th) negative sample imagecombination, and T_(sim) ² (s) represents a target similaritycorresponding to the s^(th) negative sample image combination in thesecond target distribution relationship data T_(sim) ¹.

A fifth manner includes the following steps 1077 to 1081:

1077: Determine second distribution relationship data according tosimilarities of a plurality of negative sample image combinations in afirst training round.

The second distribution relationship data represents a distribution ofthe similarities of the plurality of negative sample image combinations,and sample hand images used in a plurality of training rounds of thefeature extraction model are different.

This step is similar to step 1068, and details are not described herein.

1078: Obtain a mean value of the similarities of the plurality ofnegative sample image combinations in the first training round to obtainan original statistical value corresponding to the plurality of negativesample image combinations.

This step is similar to step 1069, and details are not described herein.

In this embodiment of this disclosure, in each training round, thefeature extraction model needs to be called to perform featureextraction on the sample hand images used in the first training round,to obtain the similarities of the plurality of negative sample imagecombinations in the first training round. The subsequent process ofobtaining the original statistical value of the first training roundthrough the similarities of the plurality of negative sample imagecombinations in the first training round is similar to the foregoingstep 1074, and the details are not repeated herein.

1079: Subtract a first preset value from a target statistical valuecorresponding to a plurality of negative sample image combinations in asecond training round, to obtain a target statistical valuecorresponding to the plurality of negative sample image combinations inthe first training round.

This step is similar to step 1070, and details are not described herein.

This embodiment of this disclosure is described by determining thetarget statistical value in the case that the first training round isnot the first round of the training. When the first training round isthe first round of the training among the plurality of training rounds,the first preset value is subtracted from the original statistical valueof the first training round as the target statistical value of the firsttraining round, that is, the foregoing step 1074 is used, to obtain thetarget statistical value of the first training round.

1080: Determine second target distribution relationship data by usingthe target statistical value corresponding to the plurality of negativesample image combinations in the first training round as a mean valueand a second preset value as a standard deviation.

This step is similar to step 1071, and details are not described herein.

1081: Determine the loss value of the feature extraction model accordingto a difference between the second distribution relationship data andthe second target distribution relationship data.

This step is similar to step 1072, and details are not described herein.

In this embodiment of this disclosure, the foregoing five manners arerespectively described, and in another embodiment, the foregoing fivemanners may be combined, for example, the first manner, the thirdmanner, and the fifth manner are combined; or the first manner, thesecond manner, and the fourth manner are combined; or the third mannerand the fifth manner are combined; or the second manner and the fourthmanner are combined.

1034: The computer device trains the feature extraction model accordingto the loss value.

The computer device trains the feature extraction model according to theobtained loss value, to reduce the loss value, thereby improving theaccuracy of the feature extraction model.

During determining of the loss value of the feature extraction model,one or more of the five manners in the foregoing embodiment may be used.When one manner is used, the loss value may be determined according tothe corresponding manner in the foregoing embodiment; and when aplurality of manners are used, statistics is performed on loss valuesobtained in the plurality of manners, to obtain a total loss value ofthe feature extraction model, and the feature extraction model istrained according to the total loss value. The statistics performed onthe loss values obtained in the plurality of manners may be to calculatea sum of the plurality of loss values, calculate a mean value of theplurality of loss values, calculate a weighted sum of the plurality ofloss values, or the like.

This embodiment of this disclosure is described by performing trainingon the feature extraction model once. However, in another embodiment,steps 1031 to 1034 may be repeatedly performed to train the featureextraction model for a plurality of iterations.

This embodiment of this disclosure is described by training the featureextraction model based on the loss value determined through theplurality of positive sample image combinations and the plurality ofnegative sample image combinations. However, in another embodiment,steps 1031 to 1034 are not required, and other manners may be used totrain the feature extraction model according to the plurality ofpositive sample image combinations and the plurality of negative sampleimage combinations.

This embodiment of this disclosure is described by obtaining the lossvalue of the feature extraction model through the plurality of positivesample image combinations and the plurality of negative sample imagecombinations. In another embodiment, steps 1031 to 1033 are notrequired, and other manners may be used to determine the loss value ofthe feature extraction model according to the plurality of sample palmprint features of the plurality of sample user identifiers.

This application is described by obtaining the loss value of the featureextraction model by generating the plurality of positive sample imagecombinations and the plurality of negative sample image combinations.However, in another embodiment, steps 1031 to 1033 are not required, andother manners may be used to obtain the loss value of the featureextraction model.

Optionally, the process of training the feature extraction model mayfurther include the following steps 1 to 4:

1: Classify the sample palm print features of the sample palm images toobtain a predicted user identifier of each sample palm image.

The predicted user identifier is used to represent a user identifierpredicted for the sample palm image, and the predicted user identifiermay be any one of a plurality of sample user identifiers.

2: Determine the loss value of the feature extraction model according toa difference between predicted user identifiers of the plurality ofsample palm images and the sample user identifiers of the plurality ofsample palm images.

Since each sample palm image corresponds to a sample user identifier, itmay be determined whether the predicted user identifier of each samplepalm image is accurate, and the difference between the predicted useridentifier of each sample palm image and the corresponding sample useridentifier may be determined. The difference is used as the loss valueof the feature extraction model, so that the feature extraction modelcan be adjusted through the loss value subsequently. In this case, theloss value of the feature extraction model may be referred to as afourth loss value.

Since the predicted user identifier is obtained through the sample palmprint feature of the sample palm image, if the sample palm print featureobtained by using the feature extraction model has high accuracy, theaccuracy of the predicted user identifier is high; and if the samplepalm print feature obtained by using the feature extraction model haslow accuracy, the accuracy of the predicted user identifier is low.Therefore, the difference between the predicted user identifiers of theplurality of sample palm images and the sample user identifiers of theplurality of sample palm images may be used as the loss value fortraining the feature extraction model, so that a distinguishing degreebetween different palm print features extracted by the trained featureextraction model is high, thereby improving the accuracy of the featureextraction model.

This embodiment of this disclosure is described by classifying thesample palm print features of the sample palm images to determine theloss value of the feature extraction model. Optionally, the process ofdetermining the loss value of the feature extraction model may furtherinclude: clustering the sample palm print features of the plurality ofsample palm images to obtain a plurality of sample palm image sets, anddetermining the loss value of the feature extraction model according todifferences of sample user identifiers to which a plurality of samplepalm images in each sample palm image set belong. In this case, the lossvalue of the feature extraction model may be referred to as a fifth lossvalue.

The plurality of sample palm print features are clustered, and aplurality of similar sample palm print features are clustered, to obtaina sample palm image set formed by sample palm images of the plurality ofsimilar sample palm print features, thereby obtaining a plurality ofsample palm image sets. According to whether a plurality of sample palmimages in each sample palm image set belong to a same sample useridentifier, a difference of each sample palm image set is determined,thereby determining the loss value of the feature extraction model.

In the model training method provided in the embodiments of thisdisclosure, sample hand images of a plurality of sample user identifiersare obtained, a plurality of sample hand images of a same sample useridentifier being acquired by using different types of devices; a palmextraction model is called to perform palm extraction on each samplehand image to obtain the sample palm images of the plurality of sampleuser identifiers; and the feature extraction model is trained accordingto the sample palm images of the plurality of sample user identifiers.The sample hand images of different sample user identifiers areobtained, and it is ensured that the plurality of hand images of eachsample user identifier are acquired by different types of devices,thereby enriching the training samples. The feature extraction model istrained through the sample hand images acquired by different types ofdevices, so that the feature extraction model can perform featureextraction on hand images of various types of devices, which enhancesthe application range of the feature extraction model and improves theaccuracy of the feature extraction model.

In the third manner and the fifth manner, the training process of thefeature extraction model is divided into a plurality of training rounds,and target statistical values are respectively set for each traininground, so that the feature extraction model can be trained step by stepsubsequently, implementing a method for training a model according to astep target distribution loss function. The accuracy of the featureextraction model can be gradually improved, thereby ensuring thestability of training the feature extraction model and improving theaccuracy of the obtained feature extraction model.

FIG. 14 is a flowchart of a model training method according to anembodiment of this disclosure. As shown in FIG. 14, the method includes:

1: Obtain a cross-device dataset, the cross-device dataset includingsample palm images acquired by different types of devices.

2: Obtain sample palm features of the sample palm images in thecross-device dataset through a feature extraction model.

3: Generate a plurality of positive sample image combinations and aplurality of negative sample image combinations according to the samplepalm images in the cross-device dataset.

4: Determine similarities of the positive sample image combinations andsimilarities of the negative sample image combinations according to thesample palm features of the sample palm images, and respectivelydetermine first distribution relationship data of the positive sampleimage combinations and second distribution relationship data of thenegative sample image combinations according to the similarities of theplurality of positive sample image combinations and the similarities ofthe plurality of negative sample image combinations.

5: Set first target distribution relationship data for the positivesample image combinations, and set second target distributionrelationship data for the negative sample image combinations.

6. Respectively determine a second loss value between currentdistribution relationship data of the positive sample image combinationsand the target distribution relationship data, and a third loss valuebetween current distribution relationship data and the targetdistribution relationship data of the negative sample image combinationsaccording to the first distribution relationship data and the firsttarget distribution relationship data of the positive sample imagecombinations, and the second distribution relationship data and thesecond target distribution relationship data of the negative sampleimage combinations, and determine a sum of the second loss value and thethird loss value.

7. Determine a first loss value according to a mean value of thesimilarities of the current positive sample image combinations and amean value of the similarities of the current negative sample imagecombinations.

8. Obtain a fourth loss value of the feature extraction model byclassifying the sample palm features.

9. Determine a total loss value of the feature extraction modelaccording to the first loss value, the sum of the second loss value andthe third loss value, and the fourth loss value, and adjust the featureextraction model according to the total loss value.

10. Determine whether the current distribution of the positive sampleimage combinations and the negative sample image combinations reaches atarget distribution; and if the target distribution is reached, adjustthe target distribution according to a preset step value, and continueto train the feature extraction model; otherwise, stop training thefeature extraction model.

As shown in FIG. 15, sample palm images acquired by a mobile phone andsample palm images acquired by an Internet of Things device areobtained; a feature extraction model is used to perform featureextraction on each sample palm image to obtain palm print features ofthe plurality of sample palm images; a loss value of the featureextraction model is determined according to the palm print features ofthe plurality of sample palm images; and the feature extraction model isiteratively trained for a plurality of training rounds according to setstep target distribution relationship data.

In each training round, a result of adjusting the feature extractionmodel is that a mean value of first distribution relationship datacorresponding to positive sample image combinations is not less than amean value of first target distribution relationship data. After theplurality of training rounds, a result of adjusting the featureextraction model in the current training round is that the mean value ofthe first distribution relationship data corresponding to the positivesample image combinations is less than the mean value of the firsttarget distribution relationship data, which indicates that the featureextraction model has reached an equilibrium state, and the training ofthe feature extraction model is stopped.

The trained feature extraction model performs feature extraction on theplurality of sample palm images, so that the obtained first distributionrelationship data of the plurality of positive sample image combinationsis similar to the first target distribution relationship data, thesecond distribution relationship data of the plurality of negativesample image combinations is similar to the second target distributionrelationship data, and the first distribution relationship data of theplurality of positive sample image combinations and the seconddistribution relationship data of the plurality of negative sample imagecombinations are far apart.

The process of training the feature extraction model may be performed onvarious datasets. Table 1 shows a comparison between various datasets atpresent. As can be seen from Table 1, hand images in different datasetsmay be obtained in different acquisition manners, and quantities of handimages included in different datasets are different. In each dataset,each palm may correspond to a plurality of hand images, and types ofacquisition devices of hand images corresponding to each dataset aredifferent.

TABLE 1 Quantity of Quantity of Type of Dataset Acquisition mannerimages palms acquisition device CASIA Non-contact 5502 624 1 IITDNon-contact 2601 460 1 PolyU Non-contact 1140 114 1 TCD Non-contact12000 600 2 MPD Mobile phone 16000 400 2

Table 2 shows a comparison of accuracy of feature extraction modelstrained by using the model training method provided in the embodimentsof this disclosure and methods of the related art on differentcross-device palm print recognition datasets according to an embodimentof this disclosure. Table 3 shows a comparison of loss values of featureextraction models trained by using the model training method provided inthe embodiments of this disclosure and methods of the related art ondifferent cross-device palm print recognition datasets according to anembodiment of this disclosure. As shown in Table 2 and Table 3, both interms of accuracy and loss values, the feature extraction model obtainedthrough the step target distribution loss function (PTD Loss) used inthe model training method provided in this application has a bettereffect than the feature extraction models obtained by using othermethods of the related art.

TABLE 2 Basic Basic convolutional convolutional Cross-modal networkmodel + Basic network model + person re- direct device target Modeltraining network relative identification distribution loss method ofthis Dataset model entropy loss method function application MOHI 84.3789.41 89.57 89.70 90.34 WEHI 65.35 75.36 76.43 76.22 77.63 MOHI-WEHI34.24 15.50 58.31 58.95 60.38 MPD-TCD, s 99.74 99.76 99.87 99.80 99.86TCD MPD-TCD, s 96.85 97.97 98.91 98.08 99.87 MPD MPD-TCD 95.00 97.7198.03 97.72 99.10

TABLE 3 Basic Basic convolutional convolutional Cross-modal networkmodel + Basic network model + person re- direct device target Modeltraining network relative identification distribution loss method ofthis Dataset model entropy loss method function application MOHI 6.846.48 6.15 6.13 5.97 WEHI 12.73 90.8 8.24 8.28 8.08 MOHI-WEHI 42.64 22.9820.22 20.15 18.36 MPD-TCD, s 0.18 0.14 0.05 0.06 0.02 TCD MPD-TCD, s1.30 0.94 0.62 0.87 0.30 MPD MPD-TCD 2.97 1.90 1.47 1.60 1.22

Table 4 shows accuracy of feature extraction models trained by trainingthe feature extraction models on different datasets by using the modeltraining method provided in the embodiments of this disclosure andmethods of the related art. Table 5 shows loss values of featureextraction models trained by training the feature extraction models ondifferent datasets by using the model training method provided in theembodiments of this disclosure and methods of the related art. As can beseen from Table 4, even on different datasets, the feature extractionmodel trained through the step target distribution loss function used inthe model training method provided in the embodiments of this disclosurehas high accuracy. As can be seen from Table 5, even on differentdatasets, the feature extraction model trained through the step targetdistribution loss function used in the model training method provided inthe embodiments of this disclosure has a low loss value. Therefore, thefeature extraction model trained by using the model training methodprovided in the embodiments of this disclosure has a good effect.

TABLE 4 Training method CASIA IITD PolyU TCD MPD PalmNet 97.17 97.3199.5 99.89 91.88 FERNet 97.65 99.61 99.77 98.63 — VGG-16 97.80 93.64 —98.46 — GoogLeNet 93.84 96.22 68.59 — — DTD Loss 99.74 100 100 100 99.58Model training method of 99.85 100 100 100 99.78 this application

TABLE 5 Training method CASIA IITD PolyU TCD MPD PalmNet 3.21 3.83 0.390.40 6.22 FERNet 0.743 0.76 0.15 — — VGG-16 7.86 7.44 — 2.86 — GoogLeNet1.65 1.97 11.19 — — DTD Loss 0.42 0.24 0.07 0.06 0.62 Model trainingmethod of 0.37 0.20 0.05 0.04 0.43 this application

Table 6 shows a comparison of accuracy and loss values of featureextraction models obtained by training the feature extraction models ina case that datasets used for training and datasets used for testing aredifferent by using the model training method provided in the embodimentsof this disclosure and methods of the related art. As can be seen fromTable 6, for any model training method, when the datasets used fortraining and the datasets used for testing are different, and theaccuracy and loss values of the obtained feature extraction models aredifferent. The feature extraction model obtained by using the modeltraining method provided in the embodiments of this disclosure has highaccuracy and a low loss value. Therefore, the feature extraction modeltrained by using the model training method provided in the embodimentsof this disclosure has a good effect.

TABLE 6 Training Test Loss Training method dataset dataset Accuracyvalue C-LMCL TCD PolyU 99.93 0.58 ArcPalm-Res TCD PolyU 98.63 0.83 Modeltraining method of this TCD PolyU 99.93 0.56 application C-LMCL PolyUTCD 98.72 1.46 ArcPalm-Res PolyU TCD 97.09 1.76 Model training method ofthis PolyU TCD 98.74 1.43 application

As shown in FIG. 16, FIG. 16 includes first distribution relationshipdata of the current positive sample image combination, firstdistribution relationship data obtained by using the step targetdistribution loss function, and first distribution relationship dataobtained by using a directly set target distribution loss function. Ascan be seen from FIG. 16, the first distribution relationship dataobtained by using the step target distribution loss function and thefirst distribution relationship data of the current positive sampleimage combination have more overlapping parts, and the firstdistribution relationship data obtained by using the directly set targetdistribution loss function and the first distribution relationship dataof the current positive sample image combination have less overlappingparts, which indicates that a difference between the first distributionrelationship data obtained by using the step target distribution lossfunction and the first distribution relationship data of the currentpositive sample image combination is small. Therefore, when the featureextraction model is adjusted according to the difference, the accuracyof the feature extraction model can be improved, so that the firstdistribution relationship data of the positive sample image combinationcan reach the first target distribution relationship data of the device,and distortion of the feature extraction model can be avoided, whichresults in inaccuracy of the feature extraction model.

As shown in FIG. 17, figures (1) and (2) both show distributions of palmprint features extracted by calling feature extraction models. Thefeature extraction model called for extracting palm print features infigure (1) is obtained through training by using the directly set targetdistribution loss function, and the feature extraction model called forextracting palm print features in figure (2) is obtained throughtraining by using a step target distribution loss function. In figure(1), a distance between two palm print features belonging to user 1 isfar, and a distance between a palm print feature belonging to user 1 anda palm print feature belonging to user 2 is close, which indicates thatthe feature extraction model obtained through training by using thedirectly set target distribution loss function has a poor capability fordistinguish palm print features of different users. In figure (2), adistance between two palm print features belonging to user 1 is close,and a distance between a palm print feature belonging to user 1 and apalm print feature belonging to user 2 is far, which indicates that thefeature extraction model obtained by using the step target distributionloss function has a good capability for distinguish palm print featuresof different users. Therefore, by using the method for training afeature extraction model provided in the embodiments of this disclosure,the obtained feature extraction model can extract palm print features ofdifferent user identifiers, and has a good distinguishing capability andhigh accuracy.

As shown in FIG. 18, in a MOHI-WEHI cross-device dataset, a largeroverlapping region of first distribution relationship data and seconddistribution relationship data obtained through a feature extractionmodel in the related art and the feature extraction model provided inthis application indicates more recognition errors of the featureextraction models. As can be learned by comparing figures (1) and (2),and comparing figures (3) and (4), whether in a training stage or in atesting stage, a distance between the first distribution relationshipdata and the second distribution relationship data obtained through thefeature extraction model of this application is large, which indicatesthat the feature extraction model of this application can distinguishpalm images of different user identifiers of different devices.

FIG. 19 shows first distribution relationship data and seconddistribution relationship data obtained through a feature extractionmodel in the related art and the feature extraction model provided inthis application in an MPD-TCD cross-device dataset. As can be learnedby comparing figures (1) and (2), and comparing figures (3) and (4),whether in a training stage or in a testing stage, a distance betweenthe first distribution relationship data and the second distributionrelationship data obtained through the feature extraction model of thisapplication is large, which indicates that the feature extraction modelof this application can distinguish palm images of different useridentifiers of different devices.

As shown in FIG. 20, figures (1) and (2) respectively show distributionsof first distribution relationship data and second distributionrelationship data obtained through trained feature extraction models ona training set and a test set of the MOHI-WEHI cross-device dataset.Figures (3) and (4) respectively show distributions of firstdistribution relationship data and second distribution relationship dataobtained through trained feature extraction models on a training set anda test set of the same TCD device dataset.

FIG. 21 is a flowchart of a method for training a feature extractionmodel according to an embodiment of this disclosure. The method isapplicable to a computer device. As shown in FIG. 21, the methodincludes:

2101: The computer device obtains sample hand images of a plurality ofsample user identifiers.

2102: The computer device calls a palm extraction model to perform palmextraction on each sample hand image to obtain the sample palm images ofthe plurality of sample user identifiers.

2103: The computer device generates a plurality of positive sample imagecombinations and a plurality of negative sample image combinationsaccording to the sample palm images of the plurality of sample useridentifiers.

2104: The computer device calls the feature extraction model to performfeature extraction on each sample palm image, to obtain a sample palmprint feature of each sample palm image.

2105: The computer device obtains a similarity of each positive sampleimage combination and a similarity of each negative sample imagecombination according to the obtained sample palm print features of theplurality of sample palm images.

2106. Obtain a first loss value of the feature extraction modelaccording to the foregoing first manner.

2107. Obtain a second loss value of the feature extraction modelaccording to the foregoing third manner.

2108. Obtain a third loss value of the feature extraction modelaccording to the foregoing fifth manner.

2109: Classify the sample palm print features of the sample palm imagesto obtain a predicted user identifier of each sample palm image, anddetermine the loss value of the feature extraction model according to adifference between predicted user identifiers of the plurality of samplepalm images and the sample user identifiers of the plurality of samplepalm images.

2110: The computer device uses the first loss value, the second lossvalue, and a sum of the third loss value and the fourth loss value as atotal loss value, and train the feature extraction model according tothe total loss value.

In a possible implementation, the first loss value Loss_(mean), thesecond loss value D_(KL) (T_(sim) ¹∥C_(sim) ¹), the third loss valueD_(KL) (T_(sim) ²∥C_(sim) ²), the fourth loss value LOSS_(Arcface), andthe total loss value Loss meet the following relationship:

Loss_(KL)=α₁ D _(KL)(T _(sim) ^(p) ∥C _(sim) ^(p))+α₂ D _(KL)(T _(sim)^(N) ∥C _(sim) ^(N))

Loss_(PDT)=Loss_(KL)+Loss_(mean)

Loss=βLoss_(PDT)+γLoss_(Arcface)

where Loss_(KL) is used to represent a loss value obtained by theweighted summation of the second loss value D_(KL) (T_(sim) ¹∥C_(sim) ¹)and the third loss value D_(KL) (T_(sim) ²∥C_(sim) ²); α₁ and α₂ areboth weight parameters, and may be any constant, for example, α₁ is 1,and α₂ is 0.1; and β and γ are both weight parameters, and may be anyconstant, for example, β is 0.5, and γ is 1.

As shown in FIG. 22, figures (1) and (2) respectively show accuracy of afeature extraction models obtained by training the feature extractionmodel on different datasets with different ratios of β to γ. It can beseen from the figures that on different datasets, only when β is 0.5 andγ is 1, the accuracy of the feature extraction model is high.

2111. Repeat the foregoing steps 2101 to 2110 to iteratively train thefeature extraction model.

2112. Stop training the feature extraction model in response to theconvergence of a sum of the first loss value, the second loss value, andthe third loss value.

Since the sum of the first loss value, the second loss value, and thethird loss value converges, a difference between similaritydistributions of positive sample image combinations and similaritydistributions of negative sample image combinations of the currenttraining round reaches an equilibrium state, that is, the distinguishingdegree between palm features of different palm images extracted by thefeature extraction model no longer increases, which indicates that thefeature extraction model has reached an equilibrium state, and thetraining of the feature extraction model is stopped.

FIG. 23 is a schematic structural diagram of a palm print recognitionapparatus according to an embodiment of this disclosure. In thisdisclosure, a unit and a module may be hardware such as a combination ofelectronic circuitries; firmware; or software such as computerinstructions. The unit and the module may also be any combination ofhardware, firmware, and software. In some implementation, a unit mayinclude at least one module. As shown in FIG. 23, the apparatusincludes:

an image obtaining module 2301, configured to obtain a target handimage, the target hand image including a palm;

a feature extraction module 2302, configured to call a featureextraction model to perform feature extraction according to the targethand image, to obtain a target palm print feature, the featureextraction model being obtained through training according to samplepalm print features of a plurality of sample user identifiers, eachsample user identifier including a plurality of sample palm printfeatures, the plurality of sample palm print features being obtained byrespectively performing feature extraction on a plurality ofcorresponding sample hand images of the sample user identifier, and aplurality of sample hand images of a same sample user identifier beingacquired by using different types of devices; and

a recognition processing module 2303, configured to perform recognitionprocessing on the target palm print feature according to a plurality ofpreset palm print features stored and user identifiers corresponding tothe preset palm print features, to determine a target user identifier ofthe target palm print feature.

In a possible implementation, the apparatus further includes a palmextraction module 2304.

The palm extraction module 2304 is configured to perform palm extractionon the target hand image to obtain a target palm image of the targethand image.

The feature extraction module 2302 is further configured to call thefeature extraction model to perform feature extraction on the targetpalm image, to obtain a target palm print feature.

In a possible implementation, as shown in FIG. 24, the apparatus furtherincludes:

an image obtaining module 2301, further configured to obtain sample handimages of a plurality of sample user identifiers;

a palm extraction module 2304, further configured to perform palmextraction on each sample hand image to obtain the sample palm images ofthe plurality of sample user identifiers;

a feature extraction module 2302, further configured to call the featureextraction model to perform feature extraction on each sample palmimage, to obtain a sample palm print feature of each sample palm image;

a loss value determining module 2305, configured to determine a lossvalue of the feature extraction model according to the sample palm printfeatures of the plurality of sample user identifiers; and

a model training module 2306, configured to train the feature extractionmodel according to the loss value.

In another possible implementation, as shown in FIG. 24, the apparatusfurther includes:

a combination generation module 2307, configured to generate a pluralityof positive sample image combinations and a plurality of negative sampleimage combinations according to the sample palm images of the pluralityof sample user identifiers, the positive sample image combinationincluding two sample palm images belonging to a same sample useridentifier, and the negative sample image combination including twosample palm images respectively belonging to different sample useridentifiers; and

the loss value determining module 2305 includes:

a similarity obtaining unit 2351, configured to obtain a similarity ofeach positive sample image combination and a similarity of each negativesample image combination according to the obtained sample palm printfeatures of the plurality of sample palm images, the similarity of thepositive sample image combination representing a similarity betweensample palm print features of two sample palm images in the positivesample image combination, and the similarity of the negative sampleimage combination representing a similarity between sample palm printfeatures of two sample palm images in the negative sample imagecombination; and

a first loss value determining unit 2352, configured to determine theloss value of the feature extraction model according to the similaritiesof the plurality of positive sample image combinations and thesimilarities of the plurality of negative sample image combinations.

In another possible implementation, the first loss value determiningunit 2352 is configured to perform statistics on the similarities of theplurality of positive sample image combinations to obtain a firststatistical value corresponding to the plurality of positive sampleimage combinations; perform statistics on the similarities of theplurality of negative sample image combinations to obtain a secondstatistical value corresponding to the plurality of negative sampleimage combinations; and determine a difference between the secondstatistical value and the first statistical value as the loss value ofthe feature extraction model.

In another possible implementation, the first loss value determiningunit 2352 is configured to determine first distribution relationshipdata according to the similarities of the plurality of positive sampleimage combinations, the first distribution relationship datarepresenting a distribution of the similarities of the plurality ofpositive sample image combinations; obtain a mean value of thesimilarities of the plurality of positive sample image combinations toobtain an original statistical value corresponding to the plurality ofpositive sample image combinations; add a first preset value to theoriginal statistical value to obtain a target statistical valuecorresponding to the plurality of positive sample image combinations;determine first target distribution relationship data by using thetarget statistical value as a mean value and a second preset value as astandard deviation; and determine the loss value of the featureextraction model according to a difference between the firstdistribution relationship data and the first target distributionrelationship data.

In another possible implementation, the first loss value determiningunit 2352 is configured to determine first distribution relationshipdata according to similarities of a plurality of positive sample imagecombinations in a first training round, the first distributionrelationship data representing a distribution of the similarities of theplurality of positive sample image combinations, and sample hand imagesused in a plurality of training rounds of the feature extraction modelbeing different; obtain a mean value of the similarities of theplurality of positive sample image combinations in the first traininground to obtain an original statistical value corresponding to theplurality of positive sample image combinations; add a first presetvalue to a target statistical value corresponding to a plurality ofpositive sample image combinations in a second training round, to obtaina target statistical value corresponding to the plurality of positivesample image combinations in the first training round, the secondtraining round being a previous training round of the first traininground; determine first target distribution relationship data by usingthe target statistical value corresponding to the plurality of positivesample image combinations in the first training round as a mean valueand a second preset value as a standard deviation; and determine theloss value of the feature extraction model according to a differencebetween the first distribution relationship data and the first targetdistribution relationship data.

In another possible implementation, the first loss value determiningunit 2352 is configured to determine second distribution relationshipdata according to the similarities of the plurality of negative sampleimage combinations, the second distribution relationship datarepresenting a distribution of the similarities of the plurality ofnegative sample image combinations; obtain a mean value of thesimilarities of the plurality of negative sample image combinations toobtain an original statistical value corresponding to the plurality ofnegative sample image combinations; subtract a first preset value fromthe original statistical value to obtain a target statistical valuecorresponding to the plurality of negative sample image combinations;determine second target distribution relationship data by using thetarget statistical value as a mean value and a second preset value as astandard deviation; and determine the loss value of the featureextraction model according to a difference between the seconddistribution relationship data and the second target distributionrelationship data.

In another possible implementation, the first loss value determiningunit 2352 is configured to determine second distribution relationshipdata according to similarities of a plurality of negative sample imagecombinations in a first training round, the second distributionrelationship data representing a distribution of the similarities of theplurality of negative sample image combinations, and sample hand imagesused in a plurality of training rounds of the feature extraction modelbeing different; obtain a mean value of the similarities of theplurality of negative sample image combinations in the first traininground to obtain an original statistical value corresponding to theplurality of negative sample image combinations; subtract a first presetvalue from a target statistical value corresponding to a plurality ofnegative sample image combinations in a second training round, to obtaina target statistical value corresponding to the plurality of negativesample image combinations in the first training round, the secondtraining round being a previous training round of the first traininground; determine second target distribution relationship data by usingthe target statistical value corresponding to the plurality of negativesample image combinations in the first training round as a mean valueand a second preset value as a standard deviation; and determine theloss value of the feature extraction model according to a differencebetween the second distribution relationship data and the second targetdistribution relationship data.

In another possible implementation, as shown in FIG. 24, the loss valuedetermining module 2305 includes:

a feature classification unit 2353, configured to classify the samplepalm print features of the sample palm images to obtain a predicted useridentifier of each sample palm image; and

a second loss value determining unit 2354, configured to determine theloss value of the feature extraction model according to a differencebetween predicted user identifiers of the plurality of sample palmimages and the sample user identifiers of the plurality of sample palmimages.

In another possible implementation, the palm extraction module 2304 isfurther configured to call the palm extraction model to perform palmextraction on the target hand image to obtain a target palm image of thetarget hand image.

In another possible implementation, as shown in FIG. 24, the palmextraction module 2304 includes:

a key point detection unit 2321, configured to perform palm key pointdetection on the target hand image to obtain at least one palm key pointin the target hand image;

a region determining unit 2322, configured to determine a target regionwhere the palm is located in the target hand image according to the atleast one palm key point; and

a palm extraction unit 2323, configured to perform palm extraction onthe target region of the target hand image to obtain a target palmimage.

In another possible implementation, the at least one palm key pointincludes a first palm key point, a second palm key point, and a thirdpalm key point, and the second palm key point is located between thefirst palm key point and the third palm key point; and

the region determining unit 2322 is configured to use a product of adistance between the first palm key point and the third palm key pointand a third preset value as a first distance;

determine a fourth palm key point, where a distance between the fourthpalm key point and the second palm key point is equal to the firstdistance, and a straight line formed by the first palm key point and thethird palm key point is perpendicular to a straight line formed by thesecond palm key point and the fourth palm key point; use a product ofthe distance between the first palm key point and the third palm keypoint and a fourth preset value as a second distance; and determine asquare target region with the fourth palm key point as a center of thetarget region and the second distance as a side length of the targetregion, or determine a circular target region with the fourth palm keypoint as the center of the target region and the second distance as aradius of the target region.

In another possible implementation, as shown in FIG. 24, the recognitionprocessing module 2303 includes:

a feature recognition unit 2341, configured to identify, according tosimilarities between the target palm print feature and each preset palmprint feature, a preset palm print feature with a largest similarity tothe target palm print feature among the plurality of preset palm printfeatures as a similar palm print feature; and

a user identifier determining unit 2342, configured to determine a useridentifier corresponding to the similar palm print feature as a targetuser identifier.

In another possible implementation, as shown in FIG. 24, the imageobtaining module 2301 includes:

an image obtaining unit 2311, configured to acquire a target hand imagein response to a resource transfer request; and

the apparatus further includes:

a resource transfer model 2308, configured to transfer resources of thetarget user identifier based on the resource transfer request.

FIG. 25 is a schematic structural diagram of an apparatus for training afeature extraction model according to an embodiment of this disclosure.As shown in FIG. 25, the apparatus includes:

an image obtaining module 2501, configured to obtain sample hand imagesof a plurality of sample user identifiers, a plurality of sample handimages of a same sample user identifier being acquired by usingdifferent types of devices;

a feature extraction module 2502, configured to call a featureextraction model to perform feature extraction according to the samplehand images, to obtain sample palm print features; and

a model training module 2503, configured to train the feature extractionmodel according to the sample palm print features of the plurality ofsample user identifiers.

In a possible implementation, the apparatus further includes a palmextraction module.

The palm extraction module is configured to perform palm extraction oneach sample hand image to obtain the sample palm images of the pluralityof sample user identifiers.

The feature extraction module 2502 is further configured to call thefeature extraction model to perform feature extraction on a sample palmimage of each sample user identifier, to obtain a sample palm printfeature of each sample palm image.

In a possible implementation, the apparatus further includes:

a loss value determining module, configured to determine a loss value ofthe feature extraction model according to the sample palm print featuresof the plurality of sample user identifiers; and

the model training module 2503 is configured to train the featureextraction model according to the loss value.

In a possible implementation, in a case that the sample palm printfeatures are obtained by performing feature extraction on each samplepalm image, the apparatus further includes:

a combination generation module, configured to generate a plurality ofpositive sample image combinations and a plurality of negative sampleimage combinations according to the sample palm images of the pluralityof sample user identifiers, the positive sample image combinationincluding two sample palm images belonging to a same sample useridentifier, and the negative sample image combination including twosample palm images respectively belonging to different sample useridentifiers; and

the loss value determining module includes:

a similarity obtaining unit, configured to obtain a similarity of eachpositive sample image combination and a similarity of each negativesample image combination according to the obtained sample palm printfeatures of the plurality of sample palm images, the similarity of thepositive sample image combination representing a similarity betweensample palm print features of two sample palm images in the positivesample image combination, and the similarity of the negative sampleimage combination representing a similarity between sample palm printfeatures of two sample palm images in the negative sample imagecombination; and

a first loss value determining unit, configured to determine the lossvalue of the feature extraction model according to the similarities ofthe plurality of positive sample image combinations and the similaritiesof the plurality of negative sample image combinations.

In another possible implementation, the first loss value determiningunit is configured to perform statistics on the similarities of theplurality of positive sample image combinations to obtain a firststatistical value corresponding to the plurality of positive sampleimage combinations; perform statistics on the similarities of theplurality of negative sample image combinations to obtain a secondstatistical value corresponding to the plurality of negative sampleimage combinations; and determine a difference between the secondstatistical value and the first statistical value as the loss value ofthe feature extraction model.

In another possible implementation, the first loss value determiningunit is configured to determine first distribution relationship dataaccording to the similarities of the plurality of positive sample imagecombinations, the first distribution relationship data representing adistribution of the similarities of the plurality of positive sampleimage combinations; obtain a mean value of the similarities of theplurality of positive sample image combinations to obtain an originalstatistical value corresponding to the plurality of positive sampleimage combinations; add a first preset value to the original statisticalvalue to obtain a target statistical value corresponding to theplurality of positive sample image combinations; determine first targetdistribution relationship data by using the target statistical value asa mean value and a second preset value as a standard deviation; anddetermine the loss value of the feature extraction model according to adifference between the first distribution relationship data and thefirst target distribution relationship data.

In another possible implementation, the first loss value determiningunit is configured to determine first distribution relationship dataaccording to similarities of a plurality of positive sample imagecombinations in a first training round, the first distributionrelationship data representing a distribution of the similarities of theplurality of positive sample image combinations, and sample hand imagesused in a plurality of training rounds of the feature extraction modelbeing different; obtain a mean value of the similarities of theplurality of positive sample image combinations in the first traininground to obtain an original statistical value corresponding to theplurality of positive sample image combinations; add a first presetvalue to a target statistical value corresponding to a plurality ofpositive sample image combinations in a second training round, to obtaina target statistical value corresponding to the plurality of positivesample image combinations in the first training round, the secondtraining round being a previous training round of the first traininground; determine first target distribution relationship data by usingthe target statistical value corresponding to the plurality of positivesample image combinations in the first training round as a mean valueand a second preset value as a standard deviation; and determine theloss value of the feature extraction model according to a differencebetween the first distribution relationship data and the first targetdistribution relationship data.

In another possible implementation, the first loss value determiningunit is configured to determine second distribution relationship dataaccording to the similarities of the plurality of negative sample imagecombinations, the second distribution relationship data representing adistribution of the similarities of the plurality of negative sampleimage combinations; obtain a mean value of the similarities of theplurality of negative sample image combinations to obtain an originalstatistical value corresponding to the plurality of negative sampleimage combinations; subtract a first preset value from the originalstatistical value to obtain a target statistical value corresponding tothe plurality of negative sample image combinations; determine secondtarget distribution relationship data by using the target statisticalvalue as a mean value and a second preset value as a standard deviation;and determine the loss value of the feature extraction model accordingto a difference between the second distribution relationship data andthe second target distribution relationship data.

In another possible implementation, the first loss value determiningunit is configured to determine second distribution relationship dataaccording to similarities of a plurality of negative sample imagecombinations in a first training round, the second distributionrelationship data representing a distribution of the similarities of theplurality of negative sample image combinations, and sample hand imagesused in a plurality of training rounds of the feature extraction modelbeing different; obtain a mean value of the similarities of theplurality of negative sample image combinations in the first traininground to obtain an original statistical value corresponding to theplurality of negative sample image combinations; subtract a first presetvalue from a target statistical value corresponding to a plurality ofnegative sample image combinations in a second training round, to obtaina target statistical value corresponding to the plurality of negativesample image combinations in the first training round, the secondtraining round being a previous training round of the first traininground; determine second target distribution relationship data by usingthe target statistical value corresponding to the plurality of negativesample image combinations in the first training round as a mean valueand a second preset value as a standard deviation; and determine theloss value of the feature extraction model according to a differencebetween the second distribution relationship data and the second targetdistribution relationship data.

In another possible implementation, in a case that the sample palm printfeatures are obtained by performing feature extraction on each samplepalm image, the loss value determining module further includes:

a feature classification unit, configured to classify the sample palmprint features of the sample palm images to obtain a predicted useridentifier of each sample palm image; and

a second loss value determining unit, configured to determine the lossvalue of the feature extraction model according to a difference betweenpredicted user identifiers of the plurality of sample palm images andthe sample user identifiers of the plurality of sample palm images.

In another possible implementation, the palm extraction module isfurther configured to:

call a palm extraction model to perform palm extraction on each samplehand image to obtain the sample palm images of the plurality of sampleuser identifiers.

FIG. 26 is a schematic structural diagram of a terminal according to anembodiment of this disclosure. The terminal can implement the operationsperformed by the computer device in the foregoing embodiments. Theterminal 2600 may be a portable mobile terminal, for example: asmartphone, a tablet computer, a Moving Picture Experts Group AudioLayer III (MP3) player, a Moving Picture Experts Group Audio Layer IV(MP4) player, a notebook computer, a desktop computer, a head-mounteddevice, a smart TV, a smart speaker, a smart remote control, a smartmicrophone, or any another smart terminal. The terminal 2600 may bealternatively referred to as user equipment, a portable terminal, alaptop terminal, a desktop terminal, or by another name.

Generally, the terminal 2600 includes a processor 2601 and a memory2602.

The processor 2601 may include one or more processing cores, forexample, a 4-core processor or an 8-core processor. The memory 2602 mayinclude one or more non-transitory computer-readable storage media. Thenon-transitory computer-readable storage media may be non-transitory andconfigured to be executed by the processor 2601 to implement the palmprint recognition method provided in the method embodiments of thisdisclosure.

In some embodiments, the terminal 2600 may optionally include aperipheral interface 2603 and at least one peripheral. The peripheralincludes: at least one of a radio frequency (RF) circuit 2604, a displayscreen 2605, and an audio circuit 2606.

FIG. 27 is a schematic structural diagram of a server according to anembodiment of this disclosure. The server 2700 may vary greatly due todifferent configurations or performance, and may include one or moreprocessors (such as CPUs) 2701 and one or more memories 2702. The memory2502 stores at least one instruction, the at least one instruction beingloaded and executed by the processor 2701 to implement the methodsprovided in the foregoing method embodiments. Certainly, the server mayalso have a wired or wireless network interface, a keyboard, aninput/output interface and other components to facilitate input/output.The server may also include other components for implementing devicefunctions. Details are not described herein again.

The server 2700 may be configured to perform the operations performed bythe computer device in the foregoing palm print recognition method.

An embodiment of this disclosure further provides a computer device,including a processor and a memory, the memory storing at least oneinstruction, the at least one instruction being loaded and executed bythe processor to implement the palm print recognition method accordingto the foregoing embodiments, or implement the method for training afeature extraction model according to the foregoing embodiments.

An embodiment of this disclosure further provides a non-transitorycomputer-readable storage medium. The non-transitory computer-readablestorage medium stores at least one instruction, the at least oneinstruction being loaded and executed by the processor to implement thepalm print recognition method or the method for training a featureextraction model according to the foregoing embodiments, or implementthe method for training a feature extraction model according to theforegoing embodiments.

An embodiment of this disclosure further provides a computer programproduct or a computer program. The computer program product or thecomputer program includes at least one instruction, the at least oneinstruction being stored in a non-transitory computer-readable storagemedium. The at least one instruction is loaded and executed by theprocessor to implement the palm print recognition method or the methodfor training a feature extraction model according to the foregoingembodiments, or implement the method for training a feature extractionmodel according to the foregoing embodiments.

A person of ordinary skill in the art may understand that all or part ofthe steps of implementing the foregoing embodiments may be implementedby hardware, or may be implemented by a program instructing relatedhardware. The program may be stored in a non-transitorycomputer-readable storage medium. The non-transitory storage mediummentioned above may be a read-only memory, a magnetic disk, or anoptical disc.

The foregoing descriptions are merely optional embodiments of theembodiments of this disclosure, but are not intended to limit theembodiments of this disclosure. Any modification, equivalentreplacement, or improvement made within the spirit and principle of theembodiments of this disclosure shall fall within the protection scope ofthis application.

What is claimed is:
 1. A method for training a feature extraction model,performed by a computer device, the method comprising: obtaining samplehand images for each of a plurality of sample user identifiers, at leasttwo of the sample hand images associated with the each of the pluralityof sample user identifier being acquired from image acquisition deviceshaving different image acquisition characteristics; calling a featureextraction model to extract sample palm print features of the pluralityof sample user identifiers; and adjusting the feature extraction modelaccording to the sample palm print features of the plurality of sampleuser identifiers.
 2. The method according to claim 1, wherein callingthe feature extraction model to extract the sample palm print featuresof the plurality of sample user identifiers comprises: performing palmextraction on each sample hand image to obtain a corresponding samplepalm image; and calling the feature extraction model to perform featureextraction on each sample palm image, to obtain a sample palm printfeature of each sample palm image.
 3. The method according to claim 2,wherein adjusting the feature extraction model according to the samplepalm print features of the plurality of sample user identifierscomprises: determining a loss value of the feature extraction modelaccording to the sample palm print features of the plurality of sampleuser identifiers; and training the feature extraction model according tothe loss value.
 4. The method according to claim 3, wherein beforedetermining the loss value of the feature extraction model according tothe sample palm print features of the plurality of sample useridentifiers, the method further comprises: generating a plurality ofpositive sample image combinations and a plurality of negative sampleimage combinations according to sample palm images of the plurality ofsample user identifiers, the positive sample image combinationcomprising two sample palm images belonging to a same sample useridentifier, and the negative sample image combination comprising twosample palm images respectively belonging to different sample useridentifiers; and determining the loss value of the feature extractionmodel according to the sample palm print features of the plurality ofsample user identifiers comprises: obtaining a similarity of eachpositive sample image combination and a similarity of each negativesample image combination according to the obtained sample palm printfeatures of the plurality of sample palm images, the similarity of thepositive sample image combination representing a similarity betweensample palm print features of two sample palm images in the positivesample image combination, and the similarity of the negative sampleimage combination representing a similarity between sample palm printfeatures of two sample palm images in the negative sample imagecombination; and determining the loss value of the feature extractionmodel according to similarities of the plurality of positive sampleimage combinations and similarities of the plurality of negative sampleimage combinations.
 5. The method according to claim 4, whereindetermining the loss value of the feature extraction model according tothe similarities of the plurality of positive sample image combinationsand the similarities of the plurality of negative sample imagecombinations comprises: performing statistics on the similarities of theplurality of positive sample image combinations to obtain a firststatistical value corresponding to the plurality of positive sampleimage combinations; performing statistics on the similarities of theplurality of negative sample image combinations to obtain a secondstatistical value corresponding to the plurality of negative sampleimage combinations; and determining a difference between the secondstatistical value and the first statistical value as the loss value ofthe feature extraction model.
 6. The method according to claim 4,wherein determining the loss value of the feature extraction modelaccording to the similarities of the plurality of positive sample imagecombinations and the similarities of the plurality of negative sampleimage combinations comprises: determining first distributionrelationship data according to the similarities of the plurality ofpositive sample image combinations, the first distribution relationshipdata representing a distribution of the similarities of the plurality ofpositive sample image combinations; obtaining a mean value of thesimilarities of the plurality of positive sample image combinations toobtain an original statistical value corresponding to the plurality ofpositive sample image combinations; adding a first preset value to theoriginal statistical value to obtain a target statistical valuecorresponding to the plurality of positive sample image combinations;determining first target distribution relationship data by using thetarget statistical value as a mean value and a second preset value as astandard deviation; and determining the loss value of the featureextraction model according to a difference between the firstdistribution relationship data and the first target distributionrelationship data.
 7. The method according to claim 4, whereindetermining the loss value of the feature extraction model according tothe similarities of the plurality of positive sample image combinationsand the similarities of the plurality of negative sample imagecombinations comprises: determining first distribution relationship dataaccording to the similarities of a plurality of positive sample imagecombinations in a current training round, the first distributionrelationship data representing a distribution of the similarities of theplurality of positive sample image combinations, and sample hand imagesused in a plurality of training rounds of the feature extraction modelbeing different; calculating a mean value of the similarities of theplurality of positive sample image combinations in the current traininground to obtain an original statistical value corresponding to theplurality of positive sample image combinations; adding a first presetvalue to a target statistical value corresponding to a plurality ofpositive sample image combinations in a previous training round of thecurrent training round, to obtain a target statistical valuecorresponding to the plurality of positive sample image combinations inthe current training round; determining first target distributionrelationship data by using the target statistical value corresponding tothe plurality of positive sample image combinations in the currenttraining round as a mean value and a second preset value as a standarddeviation; and determining the loss value of the feature extractionmodel according to a difference between the first distributionrelationship data and the first target distribution relationship data.8. The method according to claim 4, wherein determining the loss valueof the feature extraction model according to the similarities of theplurality of positive sample image combinations and the similarities ofthe plurality of negative sample image combinations comprises:determining second distribution relationship data according to thesimilarities of the plurality of negative sample image combinations, thesecond distribution relationship data representing a distribution of thesimilarities of the plurality of negative sample image combinations;obtaining a mean value of the similarities of the plurality of negativesample image combinations to obtain an original statistical valuecorresponding to the plurality of negative sample image combinations;subtracting a first preset value from the original statistical value toobtain a target statistical value corresponding to the plurality ofnegative sample image combinations; determining second targetdistribution relationship data by using the target statistical value asa mean value and a second preset value as a standard deviation; anddetermining the loss value of the feature extraction model according toa difference between the second distribution relationship data and thesecond target distribution relationship data.
 9. The method according toclaim 4, wherein determining the loss value of the feature extractionmodel according to the similarities of the plurality of positive sampleimage combinations and the similarities of the plurality of negativesample image combinations comprises: determining second distributionrelationship data according to the similarities of a plurality ofnegative sample image combinations in a current training round, thesecond distribution relationship data representing a distribution of thesimilarities of the plurality of negative sample image combinations, andsample hand images used in a plurality of training rounds of the featureextraction model being different; calculating a mean value of thesimilarities of the plurality of negative sample image combinations inthe current training round to obtain an original statistical valuecorresponding to the plurality of negative sample image combinations;subtracting a first preset value from a target statistical valuecorresponding to a plurality of negative sample image combinations in aprevious training round of the current training round, to obtain atarget statistical value corresponding to the plurality of negativesample image combinations in the current training round; determiningsecond target distribution relationship data by using the targetstatistical value corresponding to the plurality of negative sampleimage combinations in the current training round as a mean value and asecond preset value as a standard deviation; and determining the lossvalue of the feature extraction model according to a difference betweenthe second distribution relationship data and the second targetdistribution relationship data.
 10. The method according to claim 3,wherein determining the loss value of the feature extraction modelaccording to the sample palm print features of the plurality of sampleuser identifiers comprises: classifying the sample palm print feature ofeach sample palm image to obtain a predicted user identifier of the eachsample palm image; and determining the loss value of the featureextraction model according to a difference between the predicted useridentifier of the each sample palm image and the sample user identifierof the each sample palm images.
 11. The method according to claim 2,wherein performing palm extraction on the each sample hand image toobtain the corresponding sample palm image comprises: calling a palmextraction model to perform palm extraction on the each sample handimage to obtain the corresponding sample palm images.
 12. A palm printrecognition method, performed by a computer device, the methodcomprising: obtaining a target hand image, the target hand imagecomprising a palm; calling a feature extraction model to perform featureextraction according to the target hand image, to obtain a target palmprint feature, the feature extraction model being obtained throughtraining according to sample palm print features of a plurality ofsample user identifiers, each sample user identifier comprising aplurality of sample palm print features, the plurality of sample palmprint features being obtained by respectively performing featureextraction on a plurality of corresponding sample hand images of thesample user identifier, and a plurality of sample hand images of a samesample user identifier being acquired by using different types ofdevices; and performing recognition processing on the target palm printfeature according to a plurality of preset palm print features storedand user identifiers corresponding to the preset palm print features, todetermine a target user identifier of the target palm print feature. 13.A device comprising a memory for storing computer instructions and aprocessor in communication with the memory, wherein, when the processorexecutes the computer instructions, the processor is configured to causethe device to: obtain sample hand images for each of a plurality ofsample user identifiers, at least two of the sample hand imagesassociated with the each of the plurality of sample user identifierbeing acquired from image acquisition devices having different imageacquisition characteristics; call a feature extraction model to extractsample palm print features of the plurality of sample user identifiers;and adjust the feature extraction model according to the sample palmprint features of the plurality of sample user identifiers.
 14. Thedevice according to claim 13, wherein, when the processor is configuredto cause the device to call the feature extraction model to extract thesample palm print features of the plurality of sample user identifiers,the processor is configured to cause the device to: perform palmextraction on each sample hand image to obtain a corresponding samplepalm image; and call the feature extraction model to perform featureextraction on each sample palm image, to obtain a sample palm printfeature of each sample palm image.
 15. The device according to claim 14,wherein, when the processor is configured to cause the device to adjustthe feature extraction model according to the sample palm print featuresof the plurality of sample user identifiers, the processor is configuredto cause the device to: determine a loss value of the feature extractionmodel according to the sample palm print features of the plurality ofsample user identifiers; and train the feature extraction modelaccording to the loss value.
 16. The device according to claim 15,wherein, before the processor is configured to cause the device todetermine the loss value of the feature extraction model according tothe sample palm print features of the plurality of sample useridentifiers, the processor is configured to further cause the device to:generate a plurality of positive sample image combinations and aplurality of negative sample image combinations according to sample palmimages of the plurality of sample user identifiers, the positive sampleimage combination comprising two sample palm images belonging to a samesample user identifier, and the negative sample image combinationcomprising two sample palm images respectively belonging to differentsample user identifiers; and determine the loss value of the featureextraction model according to the sample palm print features of theplurality of sample user identifiers comprises: obtain a similarity ofeach positive sample image combination and a similarity of each negativesample image combination according to the obtained sample palm printfeatures of the plurality of sample palm images, the similarity of thepositive sample image combination representing a similarity betweensample palm print features of two sample palm images in the positivesample image combination, and the similarity of the negative sampleimage combination representing a similarity between sample palm printfeatures of two sample palm images in the negative sample imagecombination; and determine the loss value of the feature extractionmodel according to similarities of the plurality of positive sampleimage combinations and similarities of the plurality of negative sampleimage combinations.
 17. The device according to claim 16, wherein, whenthe processor is configured to cause the device to determine the lossvalue of the feature extraction model according to the similarities ofthe plurality of positive sample image combinations and the similaritiesof the plurality of negative sample image combinations, the processor isconfigured to cause the device to: perform statistics on thesimilarities of the plurality of positive sample image combinations toobtain a first statistical value corresponding to the plurality ofpositive sample image combinations; perform statistics on thesimilarities of the plurality of negative sample image combinations toobtain a second statistical value corresponding to the plurality ofnegative sample image combinations; and determine a difference betweenthe second statistical value and the first statistical value as the lossvalue of the feature extraction model.
 18. The device according to claim16, wherein, when the processor is configured to cause the device todetermine the loss value of the feature extraction model according tothe similarities of the plurality of positive sample image combinationsand the similarities of the plurality of negative sample imagecombinations, the processor is configured to cause the device to:determine first distribution relationship data according to thesimilarities of the plurality of positive sample image combinations, thefirst distribution relationship data representing a distribution of thesimilarities of the plurality of positive sample image combinations;obtain a mean value of the similarities of the plurality of positivesample image combinations to obtain an original statistical valuecorresponding to the plurality of positive sample image combinations;add a first preset value to the original statistical value to obtain atarget statistical value corresponding to the plurality of positivesample image combinations; determine first target distributionrelationship data by using the target statistical value as a mean valueand a second preset value as a standard deviation; and determine theloss value of the feature extraction model according to a differencebetween the first distribution relationship data and the first targetdistribution relationship data.
 19. The device according to claim 16,wherein, when the processor is configured to cause the device todetermine the loss value of the feature extraction model according tothe similarities of the plurality of positive sample image combinationsand the similarities of the plurality of negative sample imagecombinations, the processor is configured to cause the device to:determine first distribution relationship data according to thesimilarities of a plurality of positive sample image combinations in acurrent training round, the first distribution relationship datarepresenting a distribution of the similarities of the plurality ofpositive sample image combinations, and sample hand images used in aplurality of training rounds of the feature extraction model beingdifferent; calculate a mean value of the similarities of the pluralityof positive sample image combinations in the current training round toobtain an original statistical value corresponding to the plurality ofpositive sample image combinations; add a first preset value to a targetstatistical value corresponding to a plurality of positive sample imagecombinations in a previous training round of the current training round,to obtain a target statistical value corresponding to the plurality ofpositive sample image combinations in the current training round;determine first target distribution relationship data by using thetarget statistical value corresponding to the plurality of positivesample image combinations in the current training round as a mean valueand a second preset value as a standard deviation; and determine theloss value of the feature extraction model according to a differencebetween the first distribution relationship data and the first targetdistribution relationship data.
 20. The device according to claim 16,wherein, when the processor is configured to cause the device todetermine the loss value of the feature extraction model according tothe similarities of the plurality of positive sample image combinationsand the similarities of the plurality of negative sample imagecombinations, the processor is configured to cause the device to:determine second distribution relationship data according to thesimilarities of the plurality of negative sample image combinations, thesecond distribution relationship data representing a distribution of thesimilarities of the plurality of negative sample image combinations;obtain a mean value of the similarities of the plurality of negativesample image combinations to obtain an original statistical valuecorresponding to the plurality of negative sample image combinations;subtract a first preset value from the original statistical value toobtain a target statistical value corresponding to the plurality ofnegative sample image combinations; determine second target distributionrelationship data by using the target statistical value as a mean valueand a second preset value as a standard deviation; and determine theloss value of the feature extraction model according to a differencebetween the second distribution relationship data and the second targetdistribution relationship data.